哎哟,不错哦

导航

java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Timestamp

java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Timestamp 错误是因为时间类型出现了0000-00-00 00:00:00 而在hibernate将结果映射成实体时,会认为此种格式不是正确的java.sql.Timestamp,固会报错

解决方式是在url后添加&zeroDateTimeBehavior=convertToNull

 

posted on 2018-12-17 09:05  哎哟,不错哦  阅读(221)  评论(0编辑  收藏  举报