The server time zone value ‘�й���ʱ��’ is unrecognized or represents more than one time zone
错误信息:
Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException: 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
server:
port: 8000
spring:
datasource:
driverClassName: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/ml?characterEncoding=UTF8&serverTimezone=UTC
username: root
password: 123456
profiles:
active: dev
还没有评论,来说两句吧...