(1) 本地Windows测试环境
//获取到当前项目的上一级目录
public static String getProjParentPath(){
String projPath = System.getProperties().getProperty("user.dir");
return new File(projPath).getParent();
}
(2) jar包部署到Ubuntu/Linux环境
//获取到当前项目所在路径
public static String getProjPath(){
return System.getProperties().getProperty("user.dir");
}