主要原因是CommonMultipartFile传递参数的时候需要使用
注解@ReqeustParam();
使用MultipartFile就不需要使用
注解@RequestParam()
错误代码:
@RequestMapping(value = "ordinaryMultipartDataUpload")
public String uploadOrdinaryData(CommonsMultipartFile uploadData, HttpServletRequest request){
正确代码:
@RequestMapping(value = "ordinaryMultipartDataUpload")
public String uploadOrdinaryData(MultipartFile uploadData, HttpServletRequest request){
或者
@RequestMapping(value = "ordinaryMultipartDataUpload") public String uploadOrdinaryData(@RequestParam("uploadData") CommonsMultipartFile uploadData, HttpServletRequest request){