Java spring boot 2.0连接mysql异常:The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone

解决办法:application.yml提示信息表明数据库驱动com.mysql.jdbc.Driver‘已经被弃用了、应当使用新的驱动com.mysql.cj.jdbc.Driver‘

com.mysql.jdbc.Driver改成com.mysql.cj.jdbc.Driver


我接着运行项目有报错

解决办法:

spring:
datasource:
url: jdbc:mysql://localhost:3306/boot?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&useSSL=false
driverClassName: com.mysql.cj.jdbc.Driver
username: root
password: 123456


相关文章