springboot获取jar所在绝对路径

当前版本springboot2.1.3,
利用ApplicationHome类实现:
new Application(this.getClass). getSource(). getParentFile().getPath()

猜你喜欢

转载自blog.csdn.net/weixin_43792738/article/details/106762288