springmvc2.5中绑定表单日期字段报错,请大神帮忙

action为MultiActionController
绑字数据方法为
Article formData = (Article)newCommandObject(Article.class);
bind(request, formData);
其中有一个字段类型为Date型
页面文件字段为

提示:Errors binding onto object 'command'; nested exception is org.springframework.validation.BindException: org.springframework.validation.BeanPropertyBindingResult: 1 errors Field error in object 'command' on field 'createTime': rejected value [2012-07-24]; codes [typeMismatch.command.createTime,typeMismatch.createTime,typeMismatch.java.sql.Timestamp,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [command.createTime,createTime]; arguments []; default message [createTime]]; default message [Failed to convert property value of type [java.lang.String] to required type [java.sql.Timestamp] for property 'createTime'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [java.lang.String] to required type [java.sql.Timestamp] for property 'createTime': no matching editors or conversion strategy found]

•返回

请问如何解决????????

查看全部
richgood
小红树
2012/07/24 11:31
  • spring
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

0个回复