Java连接mysql数据库出现The server time zone value '�й���׼ʱ��' is unrecogni的解决

Mysql版本:8.0.17

在为MyBatis添加数据源配置时,在application.yml文件中添加了MySQL数据源连接信息。

运行代码生成类报错,The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone.

解决方法:在配置文件中的数据库url中添加serverTimezone=UTC参数即可解决。

猜你喜欢

转载自www.cnblogs.com/guiyeku/p/11577623.html
今日推荐