问答详情
源自:2-1 通用传统模式简介及通用mapper新增方法

日期存储问题

nested exception is org.apache.ibatis.reflection.ReflectionException: Could not set property 'createTime' of 'class com.zj.pojo.User1' with value 'Mon Aug 03 14:25:20 CST 2020' Cause: java.lang.IllegalArgumentException: argument type mismatch

我是用idea写的,在存储日期的时候,提示了这个错误。代码也是按着你敲的。

提问者:star君 2020-08-03 14:31

个回答

  • 老猿
    2020-08-09 16:22:50

    你的createTime是什么类型的,还有是使用的lombok插件,还是自己写的get,set方法,也可能是没有get,set方法导致的。

  • star君
    2020-08-17 11:05:42

    采用的是Date类型,按你的那个类型就没有办法实现。使用的lombok插件,没有自己写。最近没有看消息,回复迟了,抱歉。

  • qq_警醒_0
    2020-08-07 00:11:50

    没有get ,set