一,数据库相关

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开发常见问题及解决方案_springboot

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

SQL Error:1048,SQLState:23000

Colum createtime cannot be null

java开发springboot开发常见问题及解决方案_sql语句_02

java开发springboot开发常见问题及解决方案_开发常见问题_03

解决办法:在对应的bean上加以下两个注释

java开发springboot开发常见问题及解决方案_springboot_04

持续更新中。。。。。。