Fork me on GitHub

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参数即可解决。

 

 

 

 

posted @ 2019-09-24 12:09  踏花自在天  阅读(12085)  评论(0编辑  收藏  举报