spring boot java.sql.SQLException: The server time zone value '乱码' is unrecognized or represents more than one time zone

在springboot项目中,由于使用了高版本的mysql驱动(6.0+以后)就会出现需要设置时区的问题
jdbc.url改一下就行了,中国为东八区
spring.datasource.url=jdbc:mysql://localhost:33066/test?useUnicode=true&characterEncodeing=UTF-8&useSSL=false&serverTimezone=GMT%2B8
 

posted on 2021-02-25 16:31  signheart  阅读(121)  评论(0编辑  收藏  举报

导航