Cool
Cool
Published on 2024-11-22 / 11 Visits
0
0

springboot获取项目的根目录,和获取编译后jar包的所在的目录

仅仅需要2行代码!!!!

File file = new File("");
System.out.println(file.getAbsolutePath());

Comment