依照https://stackoverflow.com/questions/23702041/failed-to-convert-property-value-of-type-java-lang-string-to-required-type-java文章所说:

加上如下注解:

@DateTimeFormat(pattern = "dd/MM/yyyy")
@Temporal(TemporalType.DATE)

具体代码如下

@Data
public class WrongAnswerRecordParam extends BasicParam{
private Byte source; @NotNull(message="用户ID不能为空")
private Long userId;
private Long wrongAnswerId;
private Long wrongAnswerTagId;
private Long questionId;
private Byte taskId;
private Long groupId;
private Integer subjectId;
private String comment;
private Long tagId;
private Byte type;
private Date updateTime;
private Date createTime; @DateTimeFormat(pattern = "yyyy-MM-dd")
private Date beginTime; @DateTimeFormat(pattern = "yyyy-MM-dd")
private Date endTime;
}

解决

[Failed to convert property value of type 'java.lang.String' to required type 'java.util.Date' for property 'beginTime';的更多相关文章

  1. spring mvc出现 Failed to convert property value of type 'java.lang.String' to required type 'java.util.Date' for property 'endtime'

    在使用spring mvc中,绑定页面传递时间字符串数据给Date类型是出错: Failed to convert property value of type [java.lang.String] ...

  2. 【spring mvc】后台API查询接口,get请求,后台Date字段接收前台String类型的时间,报错default message [Failed to convert property value of type 'java.lang.String' to required type 'java.util.Date' for property 'createDate';

    后台API查询接口,get请求,后台Date字段接收前台String类型的时间筛选条件 后台接口接收 使用的实体 而createDate字段在后台实体中是Date类型 报错信息: org.spring ...

  3. Java 异常 Failed to convert property value of type 'java.lang.String' to required type 'java.util.Date'

    查询时发送给服务器的日期的字符串格式:yyyy-MM-dd HH:mm:ss 服务器接收到日期的字符串之后,向 MySQL 数据库发起查询时,因为没有指定日期时间格式,导致字符串数据不能正确地转换为日 ...

  4. Cannot convert value of type [java.lang.String] to required type [java.util.Date] for property 'xxx': no matching editors or conversion strategy found

    今天在完成项目的时候遇到了下面的异常信息: 04-Aug-2014 15:49:27.894 SEVERE [http-apr-8080-exec-5] org.apache.catalina.cor ...

  5. Cannot convert value of type [java.lang.String] to required type [javax.sql.DataSource] for property 'dataSource': no matching editors or conversion strategy found

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFa ...

  6. 解决spring mvc 上传报错,Field [] isn't an enum value,Failed to convert value of type 'java.lang.String[]' to required type '

    没有选择附件,但是点击上传按钮的时候会报错. 之前不选择文件,直接上传空文件是可以的,后来不知道改了什么就不行了. 错误信息: -- :: [http--] TRACE org.springframe ...

  7. Failed to convert value of type 'java.lang.String' to required type 'java.time.LocalDate';

    springboot jdbc查询使用LocalDate报:Failed to convert value of type 'java.lang.String' to required type 'j ...

  8. SpringBoot 项目启动 Failed to convert value of type 'java.lang.String' to required type 'cn.com.goldenwater.dcproj.dao.TacPageOfficePblmListDao';

    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'tac ...

  9. 完美解决报错Failed to convert value of type 'java.lang.String' to required type 'java.util.Date'

    Failed to convert value of type 'java.lang.String' to required type 'java.util.Date' 首先这个错误的意思是 前台页面 ...

  10. 前台传参数时间类型不匹配:type 'java.lang.String' to required type 'java.util.Date' for property 'createDate'

    springMVC action接收参数: org.springframework.validation.BindException: org.springframework.validation.B ...

随机推荐

  1. 利用样式——android2.3实现android4.0风格的edittext

    先看效果: 思路:在源码里找到4.0风格的图片作为背景,xml文件定义点击时候边框变化 步骤: ①.在F:\sdk\sdk\platforms\android-14\data\res\drawable ...

  2. wifidog 源码初分析(1)-转

    wifidog 的核心还是依赖于 iptables 防火墙过滤规则来实现的,所以建议对 iptables 有了了解后再去阅读 wifidog 的源码. 在路由器上启动 wifidog 之后,wifid ...

  3. (转)Unity导出Android在高通骁龙800以上CPU概率性崩溃解决方法研究

    Android上的奇葩问题真的是太多了,开始测试反馈说游戏在某些Android手机上随机crash,后来经过详细的测试发现随机闪退的手机都是搭载了高通骁龙800以上的CPU.然后连上真机当crash的 ...

  4. Node.js中 express-session的奇怪问题

      var session = require('express-session');   app.use(cookieParser()); 行 登录以后访问的时候有时候会报这样的错误: The la ...

  5. ArcMap中条件语句的bug

    ArcGIS作为一个十分强大的GIS工具平台,也有其bug,在以前在听说过关于SQL条件语句的bug,现在用的10.4.1,仍然与数据有关. 这个bug的出现也是非常偶然,与数据有密切的关系:发现省界 ...

  6. android中XRecyclerView控件的使用

    控件的地址:https://github.com/XRecyclerView/XRecyclerView XRecyclerView控件是一个加强版的RecyclerView,可以很方便的实现下拉刷新 ...

  7. GetParam(name)

    function GetParam(name) { var match = new RegExp(name + "=*([^&]+)*", "i").e ...

  8. Maven教程初级篇02:pom.xml配置初步

    1. 创建项目并更改项目基本配置信息 在命令行下运行如下命令创建一个项目: 1 mvn archetype:create -DgroupId=net.jianxi.tutorials     2    ...

  9. jquery vue 框架区别

    1.数据和视图分离,解耦 2.以数据驱动视图,只关心数据变化,DOM操作被封装

  10. 利用Percona monitoring for zabbix监控MySQL

    系统要求 被监控的主机及mysql监控账号,zabbix agent 2.0或以上(最好与zabbix-server版本相同),php, php-mysql(php版本没有限制,经测试5.3是可以的. ...