Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException: The server time zone value '�й���׼ʱ��' is unrecognized or r

问题:今天在IDE中进行mysql单元测试的时候,出现这个问题的,猜测原因可能是由于数据库版本不同造成的;

解决:将url进行修改即可  datasource.url=jdbc:mysql://localhost:3306/springboot?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8

参考:https://blog.csdn.net/lvhaoguang0/article/details/83714352

备注:

我使用的mysql的maven版本为:

<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version> 5.1.43.RELEASE</version>
</dependency>
原文地址:https://www.cnblogs.com/xiaofengshan/p/13449753.html