IDEA报错
java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone.
代码如下
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: 123456
url: jdbc:mysql://localhost:3306/beautyshopping?characterEncoding=utf8&serverTimeZone=UTC
提示我是时区错误,然后值是乱码
本来用的是serverTimeZone=Asia/Shanghai,后来看网上教程使用了&serverTimezone=UTC和serverTimezone=GMT%2B8,就可以了