SpringBoot连接数据库项目运行报错:Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException

SpringBoot连接数据库项目运行报错:Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException: 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 configurat
这不是本身项目的错误,而是版本的不一致问题,为了使MySQL JDBC驱动程序的5.1.33版本与UTC时区配合使用,就需要在配置文件中数据库连接后面指定serverTimezone,代码如下:
SpringBoot连接数据库项目运行报错:Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException