mysql日期更新Data truncation: Incorrect datetime value

18:07:49  ### Cause: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Incorrect datetime value: '2016-03-13T02:11:00' for column 'update_time' at row 1
18:07:49  ; Data truncation: Incorrect datetime value: '2016-03-13T02:11:00' for column 'update_time' at row 1; nested exception is com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Incorrect datetime value: '2016-03-13T02:11:00' for column 'update_time' at row 1
18:07:49  	at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:104)
18:07:49  	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
18:07:49  	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)
18:07:49  	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)
18:07:49  	at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:88)
18:07:49  	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440)
18:07:49  	at com.sun.proxy.$Proxy50.update(Unknown Source)
18:07:49  	at org.mybatis.spring.SqlSessionTemplate.update(SqlSessionTemplate.java:287)
18:07:49  	at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:67)
18:07:49  	at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:152)
18:07:49  	at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:85)
18:07:49  	at com.sun.proxy.$Proxy69.updateSoldListingInfo(Unknown Source)
18:07:49  	at com.homethy.datastore.listing.service.impl.SoldListingDataServiceImpl.updateSoldListingInfo(SoldListingDataServiceImpl.java:87)
18:07:49  	at com.homethy.todb.NewListingDatasToDB.insertSoldListing(NewListingDatasToDB.java:398)

数据库类型为timestamp,代码类型为string。

线上环境报错,测试环境无法复现(尝试过更改mysql版本),有没有大佬帮忙看看什么原因

查看全部
weixin_42150082
美腻程序媛
2020/11/30 11:53
  • spring
  • java
  • mysql
  • 点赞
  • 收藏
  • 回答
    私信

10个回复