mybatis 出现 Value '0000-00-00' can not be represented as java.sql.Date

来源:互联网 发布:linux同名文件夹合并 编辑:程序博客网 时间:2024/05/28 05:15
      今天在对一个语句进行调试时发现,对于mysql进行时间的比较时,出现了can not be represented as java.sql.Date ,这个错误,这个错误如何解决哪?经过我查询资料发现:从http://www.cnblogs.com/hwaggLee/p/5230429.html中的那篇英文中,我们就可以知道那个问题了,如何解决我们需要给jdbc的url中配置为db.writer.url=jdbc:mysql://127.0.0.1:3306/yt?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull,也就是加上&zeroDateTimeBehavior=convertToNull这个,这样就搞定了。
阅读全文
0 0
原创粉丝点击