MyBatis项目报错:The server time zone value '�й�׼' is unrecognized or represents more than one time zone

问题来源:在部署Spring + MyBatis项目的时候,运行时报错The server time zone value '�й�׼' is unrecognized or represents more than one time zone

解决办法:

将时区更换一下即可,如图所示。

如果参数不是在第一个,写成

<property name="jdbcUrl"> jdbc:mysql://localhost:3306/exam?characterEncoding=utf8&amp;serverTimezone=UTC </property>

因为在xml的配置文件中 ;要用 &amp;代替。

方法二:

在mysql中执行命令: 
set global time_zone='+8:00' 

修改好了就不会报错了。

原文地址:https://www.cnblogs.com/xuhai/p/7999232.html