SpringBoot运行报错
- 控制台错误信息
只简单展示错误信息:
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.
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129) ~[mysql-connector-java-8.0.15.jar:8.0.15]
- 修改后的Url:
spring:
profiles:
active:
- thymeleaf
- mybatis
# druid
datasource:
type: com.alibaba.druid.pool.DruidDataSource
# 注意mysql时区默认为UTC
# 原来的url: jdbc:mysql://127.0.0.1:3306/xxx?useSSL=false&useUnicode=true&characterEncoding=UTF-8
url: jdbc:mysql://127.0.0.1:3306/xxx?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone