标签:null div color 类型 url log ref rtt har
同步发布:http://www.yuanrengu.com/index.php/mysqlsolvetimestamp.html
在使用mysql时,如果数据库中的字段类型是timestamp,默认为0000-00-00,会发生异常:Value ‘0000-00-00 00:00:00’ can not be represented as java.sql.Timestamp.
解决办法如下:
给数据库的jdbc.url加上zeroDateTimeBehavior参数,如下:
jdbc.url=jdbc:mysql://localhost:3306/table?characterEncoding=UTF-8&zeroDateTimeBehavior=round
zeroDateTimeBehavior参数有两种配置:
mysql解决Value ‘0000-00-00 00:00:00’ can not be represented as java.sql.Timestamp
标签:null div color 类型 url log ref rtt har
原文地址:http://www.cnblogs.com/heyonggang/p/6086303.html