private int maxUploadSizeInMb = 1024 * 1024; // 1 MB
@Bean
public CommonsMultipartResolver multipartResolver(){
CommonsMultipartResolver cmr = new CommonsMultipartResolver();
cmr.setMaxUploadSize(maxUploadSizeInMb * 10);
cmr.setMaxUploadSizePerFile(maxUploadSizeInMb * 5);
return cmr;
}
@ResponseBody
@PostMapping(value = "/upload")
public String setUpload(@RequestParam("upfile")MultipartFile file) {
}