mirror of
https://gitee.com/nutz/nutzboot.git
synced 2024-12-03 12:18:50 +08:00
修正注解
This commit is contained in:
parent
e601b323ff
commit
2b0cff0837
@ -21,7 +21,7 @@ public class PropertiesConfigureLoader extends AbstractConfigureLoader {
|
||||
|
||||
// 获取应用程序绝对路径
|
||||
private static String getBasePath() {
|
||||
// 获取mainClass,参照AppContext调试分析,Thread.currentThread().getStackTrace()的最后一个元素就是主方法
|
||||
// 获取mainClass,参照AppContext调试分析,Thread.currentThread().getStackTrace()的最后一个元素就是主类mainClass
|
||||
String basePath = "";
|
||||
StackTraceElement[] ts = Thread.currentThread().getStackTrace();
|
||||
basePath = Lang.loadClassQuite(ts[ts.length-1].getClassName()).getProtectionDomain().getCodeSource().getLocation().getPath();
|
||||
|
Loading…
Reference in New Issue
Block a user