进行JdbcTemplate整合时,出现The server time zone value '�й���׼ʱ��' is unrecognized or represents m

学习springboot过程中,在进行jdbcTemplate整合时,编译成功后,显示如下
进行JdbcTemplate整合时,出现The server time zone value '�й���׼ʱ��' is unrecognized or represents m
本以为一切都成功了,可是当打开浏览器进入

http://localhost:8080/bookOps
时,却出现了如下情况
进行JdbcTemplate整合时,出现The server time zone value '�й���׼ʱ��' is unrecognized or represents m
浏览器一直处于更新状态,但就是每结果,那个进度圈就一直转着
再次打开编译器,发现有了报错
进行JdbcTemplate整合时,出现The server time zone value '�й���׼ʱ��' is unrecognized or represents m
错误提示如下

2019-09-04 21:46:50.518 ERROR 10040 --- [reate-107894960] com.alibaba.druid.pool.DruidDataSource   : create connection SQLException, url: jdbc:mysql:///chapter05, errorCode 0, state 01S00

java.sql.SQLException: 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 configuration property) to use a more specifc time zone value if you want to utilize time zone suppor

看到这里感觉是mysql的配置出了问题,经过查询资料,发现只需要在spring.datasource.url=jdbc:mysql:///chapter05后面补上?serverTimezone=UTC就可以了

协调世界时,又称世界统一时间、世界标准时间、国际协调时间。
由于英文(CUT)和法文(TUC)的缩写不同,作为妥协,简称UTC

上一篇:java.sql.SQLException: The server time zone value ‘�й���׼ʱ��’ is unrecognized or represents more tha


下一篇:【BUG】java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or r