一,数据库相关

1,Caused by: java.sql.SQLException: The server time zone value ‘Öйú±ê׼ʱ¼ä’ is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.

解决:通过最后一句我们知道,JDBC 8以上的版本必须配置时区
所以要在连接MySQL服务器地址的位置跟上?serverTimeZone=UTC
java开发springboot开发常见问题及解决方案

2,在创建数据表的时候sql语句里已经加了默认时间,但是还会报错:

SQL Error:1048,SQLState:23000
Colum createtime cannot be null
java开发springboot开发常见问题及解决方案
java开发springboot开发常见问题及解决方案
解决办法:在对应的bean上加以下两个注释
java开发springboot开发常见问题及解决方案

持续更新中。。。。。。

相关文章:

  • 2021-05-24
  • 2021-09-14
  • 2022-12-23
  • 2022-01-09
  • 2021-12-30
  • 2021-09-26
  • 2022-12-23
猜你喜欢
  • 2022-01-19
  • 2021-10-07
  • 2021-11-01
  • 2021-11-19
  • 2021-12-14
  • 2022-12-23
  • 2021-12-05
相关资源
相似解决方案