版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/skye_95/article/details/89335634
问题:
在创建springboot+mybatis项目时,在浏览器输入网址运行,项目报错:
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.
原因:
查阅资料发现是由于数据库和系统时区差异所造成的,SpringBoot在你没有指定MySQL驱动版本的情况下它自动依赖的驱动是8.0.12很高的版本。
解决办法:
在jdbc连接的url后面加上serverTimezone=GMT即可解决问题。