Field error in object 'shop' on field 'pimg': rejected value [org.springframework.web.multipart.commons.CommonsMultipartFile@1bc4741f]; codes [typeMismatch.shop.pimg,typeMismatch.pimg,typeMismatch.java.lang.String,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [shop.pimg,pimg]; arguments []; default message [pimg]]; default message [Failed to convert property value of type 'org.springframework.web.multipart.commons.CommonsMultipartFile' to required type 'java.lang.String' for property 'pimg'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'org.springframework.web.multipart.commons.CommonsMultipartFile' to required type 'java.lang.String' for property 'pimg': no matching editors or conversion strategy found]]
表单提交中<input type="file" name="">中name属性值和实体类中的属性名一样了, 不能一样