我使用的彈簧引導啓動,網絡,我想改變從上傳請求映射回了短信:改變彈簧MissingServletRequestPartException消息
@RequestMapping("/upload")
public @ResponseBody String upload(@RequestParam("file") MultipartFile file){...}
我有什麼對HTTP/1.1 404沒有發現是:
{"timestamp":1462064481371,"status":404,"error":"Not Found",
"exception":"org.springframework.web.multipart.support.MissingServletRequestPartException",
"message":"Required request part 'file' is not present","path":"/upload"}
我想改變「必需請求部分‘文件’不存在」這樣的事情「參數缺少
012。有沒有一個簡單的方法來完成這個註釋?
如果可能,我想排除異常信息。
謝謝。