mirror of
https://gitee.com/dromara/Jpom.git
synced 2024-12-03 04:18:21 +08:00
还原
This commit is contained in:
parent
7232f50df6
commit
46d4659b75
@ -214,16 +214,9 @@ public class JpomManifest {
|
||||
*/
|
||||
public static File getRunPath() {
|
||||
URL location = ClassUtil.getLocation(JpomApplication.getAppClass());
|
||||
try {
|
||||
URLConnection urlConnection = location.openConnection();
|
||||
if (urlConnection instanceof JarURLConnection) {
|
||||
JarURLConnection jarURLConnection = (JarURLConnection) urlConnection;
|
||||
return FileUtil.file(jarURLConnection.getJarFile().getName());
|
||||
}
|
||||
return FileUtil.file(location.getFile());
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
String file = location.getFile();
|
||||
String before = StrUtil.subBefore(file, "!", false);
|
||||
return FileUtil.file(before);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user