bad_yixiong 2017-03-31 01:21 采纳率: 33.3%
浏览 2978
已采纳

easyUI中easyui-datebox在form提交时页面报错400bad request

java代码
图片说明
页面报错信息
图片说明
后台报错信息
Field error in object 'user' on field 'birthday': rejected value [2017-03-08]; codes [typeMismatch.user.birthday,typeMismatch.birthday,typeMismatch.java.util.Date,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [user.birthday,birthday]; arguments []; default message [birthday]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'java.util.Date' for property 'birthday'; nested exception is org.springframework.core.convert.ConversionFailedException: Failed to convert from type java.lang.String to type java.util.Date for value '2017-03-08'; nested exception is java.lang.IllegalArgumentException]
2017-03-31 09:10:21,692 [http-bio-8081-exec-2] [org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver]-[DEBUG] Resolving exception from handler [public cn.com.hahs.common.vo.SysResult cn.com.hahs.manage.controller.UserController.saveUser(cn.com.hahs.manage.pojo.User)]: org.springframework.validation.BindException: org.springframework.validation.BeanPropertyBindingResult: 1 errors

我在使用easyUI框架的时候出现的这个问题,请问该怎么解决。我是做java后台开发的,现在公司就我一个人在搞这个项目。急!!

  • 写回答

1条回答 默认 最新

  • Onion-- 2017-03-31 01:27
    关注

    将user实体类的birthday类型改为String类型

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?