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) {
} <input id="whatButton">
<button id="button1" onclick="inputEdit(this.id)">1</button>
<button id="button2" onclick="inputEdit(this.id)">2</button>
<button id="button3" onclick="inputEdit(this.id)">3</button>function inputEdit(id) {
document.getElementById("whatButton").value = id;
}