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 support.
启动项目出现以上错误。
解决:
在配置数据源的时候,在url中加上serverTimezone=UTC
spring: datasource: #配置datasource username: root password: 123456 driverClassName: com.mysql.cj.jdbc.Driver url: jdbc:mysql:///blog?serverTimezone=UTC type: com.alibaba.druid.pool.DruidDataSource #使用那个连接池
学习java的,可以关注公众号,可以免费获取毕业设计项目、各种免费软件、资料,笔记哦。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)