Cannot convert value of type [org.springframework.web.multipart.commons.CommonsMultipartFile] to required type [java.lang.String] for property 's_img': no matching editors or conversion strategy found]
检查你的函数是否添加了@RequestParam MultipartFile file
然后看你的表单上传文件的input框的name是否是实体类的属性,如果是请换掉,不然会将其带成file类型参数传过去,而你的这个属性是String类型所以会报类型错误。参数非法
以下为错误例子
以下为正确例子