Loading
0

Spring Boot获取运行Jar包的目录

private String getJarFilePath() {
    ApplicationHome home = new ApplicationHome(getClass());
    File jarFile = home.getSource();
    return jarFile.getParentFile().toString();
}

最后编辑于:2022/1/20作者: joycode

我不入地狱,谁入地狱?

评论已关闭