@ResponseBody //請假時間,效驗時間重複 1通過->沒有重複值 0->請假時間重複
@RequestMapping(value = "/test", method = RequestMethod.GET)
public String test() {
String property = System.getProperty("user.dir");
property=property.substring(0,property.lastIndexOf("\\"));
SimpleDateFormat sdf=new SimpleDateFormat("yyyyMMdd");
File file=new File(property+"/webapps/"+sdf.format(new Date()));
if(!file.exists()){
file.mkdirs();
}
String path = file.getAbsolutePath();
System.out.println("path===="+path);//tomcat文件夾
return property;
}