@PostMapping("/file")
public String get(MultipartFile file) throws IOException {
// 文件存放服务端的位置
String rootPath = "/data";
File dir = new File(rootPath + File.separator + "tmpFiles");
if (!dir.exists())
dir.mkdirs();
// 写文件到服务器
File serverFile = new File(dir.getAbsolutePath() + File.separator + file.getOriginalFilename());
file.transferTo(serverFile);
return "成功";
}