@RequestMapping(value = "/add")
public String addGeneDiagProj(AddReq addReq,
@RequestParam("diagnoseFile") MultipartFile diagnoseFile,
HttpServletRequest request,HttpServletResponse response,ModelMap model)
{
String fileSep = System.getProperty("file.separator");
String filePath = request.getSession().getServletContext().getRealPath(fileSep);
File foler = new File(filePath.concat("diagnoseFile").concat(fileSep).concat(fileSep+"projectNo"));
if(!foler.exists())
{
boolean f = foler.mkdirs();
if(!f)
{
LOG.error(getClass().getSimpleName()+" foler.mkdirs failed,folder:"+foler.getAbsolutePath());
}
}
File des
springmvc controller获得绝对路径及MultipartFile保存文件
最新推荐文章于 2024-05-23 18:27:55 发布