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