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

后端 未结 6 1208
名媛妹妹
名媛妹妹 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:10

    My wild guess is that you're using MySQL, your date columns are not mandatory and hence can contain NULLs, but MySQL does idiotic things and will return 0000-00-00 instead of NULL unless you fix the MySQL server settings.

提交回复
热议问题