Skip to content

Commit f8f76dd

Browse files
author
microacup
committed
Windows中文环境解决The server time zone value '?й???????' is unrecognized问题,增加serverTimezon=UTC
1 parent 3737ace commit f8f76dd

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

src/main/resources/application-production.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ spring:
1414

1515
dataSource:
1616
driverClassName: com.mysql.jdbc.Driver
17-
url: jdbc:mysql://127.0.0.1/spring_blog
17+
url: jdbc:mysql://127.0.0.1/spring_blog?serverTimezone=UTC
1818
username: root
1919
password:
2020

src/main/resources/application.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
server:
2+
port: 9000
3+
contextPath:
4+
15
spring:
26
profiles:
37
active: dev
@@ -9,8 +13,8 @@ spring:
913
caching: false
1014

1115
dataSource:
12-
driverClassName: com.mysql.jdbc.Driver
13-
url: jdbc:mysql://127.0.0.1/spring_blog
16+
driverClassName: com.mysql.cj.jdbc.Driver
17+
url: jdbc:mysql://127.0.0.1/spring_blog?serverTimezone=UTC
1418
username: root
1519
password:
1620

0 commit comments

Comments
 (0)