public String getWebContentPath(String projiectName){
String path=Thread.currentThread().getContextClassLoader().getResource("").getPath();
System.out.println(path);
int num = path.indexOf(".metadata");
String webContentPath = path.substring(1,num).replace('/', '\\')+projiectName+"\\WebContent\\";
return webContentPath;
}
获取根路径
最新推荐文章于 2023-06-19 09:59:00 发布