qq_43396436
qq_43396436
2018-11-27 02:13

修改图片保存 400 控制台只打印一条数据 有没有哪位大神遇到过

  • multipartfile
  • 图片

这是控制台打印的 Field error in object 'film' on field 'imageName': rejected value [org.springframework.web.multipart.support.StandardMultipartHttpServletRequest$StandardMultipartFile@5d83e8de]; codes [typeMismatch.film.imageName,typeMismatch.imageName,typeMismatch.java.lang.String,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [film.imageName,imageName]; arguments []; default message [imageName]]; default message [Failed to convert property value of type 'org.springframework.web.multipart.support.StandardMultipartHttpServletRequest$StandardMultipartFile' to required type 'java.lang.String' for property 'imageName'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'org.springframework.web.multipart.support.StandardMultipartHttpServletRequest$StandardMultipartFile' to required type 'java.lang.String' for property 'imageName': no matching editors or conversion strategy found]]

Controller 代码图片说明

报错信息

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

3条回答