昨天遇到一个问题,请求发送之后直接返回了500错误,没有过ErrorController。并且Server这边的log里也没有异常。这真的是好奇怪。
产生问题的method是这样写的:
@RequestMapping(params = "method=bulkChange", method = RequestMethod.POST) public @ResponseBody User changePhoto( @RequestParam(value = DESCRIPTION_NAME, required = false, defaultValue = DESCRIPTION_DEFAULT) String description, @RequestParam(value= PHOTO_NAME, required = false, defaultValue = PHOTO_DEFAULT) MultipartFile photo, HttpServletRequest request, HttpServletResponse response) throws Exception{ }
改好后就解决了之前的问题。
Failed to convert value of type 'java.lang.String' to required type 'org.springframework.web.multipa
原文:http://blog.csdn.net/cctt_1/article/details/18260323