SpringBoot项目连接mysql数据库时产生
错误描述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连接的url后面加上serverTimezone=GMT
解决办法在jdbc连接的url后面加上?serverTimezone=GMT
添加前
jdbc:mysql://localhost:3306/springboot
添加后
jdbc:mysql://localhost:3306/springboot?serverTimezone=GMT



