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

### Cause: java.sql.SQLException: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp
; SQL []; Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp; nested exception is java.sql.SQLException: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp
org.springframework.dao.TransientDataAccessResourceException:
### Error querying database.  Cause: java.sql.SQLException: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp

 

Simplest solution:

Add in the jdbc connection:zeroDateTimeBehavior=convertToNull

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326747803&siteId=291194637