// 包部署路径xxx/run/xxx.jar
System.out.println("user.dir:" + System.getProperty("user.dir"));// xxx/run
ApplicationHome applicationHome = new ApplicationHome(Application.class);
System.out.println(source.getParentFile().getPath()); // xxx/run/xxx.jar
System.out.println(applicationHome.getDir().getPath()); // xxx/run
最后
以上就是活力玫瑰最近收集整理的关于获取SpringBoot包的部署路径的全部内容,更多相关获取SpringBoot包内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复