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

学习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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值