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

后端 未结 6 1212
名媛妹妹
名媛妹妹 2020-12-05 08:43

I\'m working on some project which needs to extract data from DB and I use Spring MVC to build model from DB for selecting data.

Here is the problem with my

6条回答
  •  不知归路
    2020-12-05 09:11

    Append the following statement with the JDBC-mysql protocol:

    "?zeroDateTimeBehavior=convertToNull&autoReconnect=true&characterEncoding=UTF-8&characterSetResults=UTF-8"
    

    for Example:

    jdbc:mysql://localhost/infra?zeroDateTimeBehavior=convertToNull&autoReconnect=true&characterEncoding=UTF-8&characterSetResults=UTF-8
    

提交回复
热议问题