// file 通过spring注解获取
String imageName = file.getOriginalFilename();
// 获取服务器目录
String localServerPath = request.getSession().getServletContext().getRealPath("/");
// 将文件先存至本地
FileUtils.copyInputStreamToFile(file.getInputStream(), new File(localServerPath, imageName));