其他分享
首页 > 其他分享> > 进行JdbcTemplate整合时,出现The server time zone value '�й���׼ʱ��' is unrecognized or represents m

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

作者:互联网

学习springboot过程中,在进行jdbcTemplate整合时,编译成功后,显示如下
在这里插入图片描述
本以为一切都成功了,可是当打开浏览器进入

http://localhost:8080/bookOps
时,却出现了如下情况
在这里插入图片描述
浏览器一直处于更新状态,但就是每结果,那个进度圈就一直转着
再次打开编译器,发现有了报错
在这里插入图片描述
错误提示如下

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

标签:represents,zone,time,value,server,unrecognized,mysql,more
来源: https://blog.csdn.net/sinat_42994131/article/details/100547696