Skip to content

Commit 2b0e995

Browse files
author
siu
committed
feat:测试动态切换数据源
1 parent c9d89be commit 2b0e995

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

myboot-demo-ganxu/ganxu-admin-api/src/main/resources/application-datasource-dev.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@ spring:
55
# 使用p6spy
66
url: jdbc:p6spy:postgresql://postgres.host:5432/ganxu?currentSchema=ganxu&useSSL=false&serverTimezone=GMT%2B8&autoReconnect=true
77
username: postgres
8-
password: 1229
8+
password: postgres
99
#driver-class-name: org.postgresql.Driver
1010
# 使用p6spy 监控
1111
driver-class-name: com.p6spy.engine.spy.P6SpyDriver
1212
# 2、多数据源配置
1313
# primary:
1414
# url: jdbc:postgresql://localhost:5432/primary?currentSchema=public&useSSL=false&serverTimezone=GMT%2B8&autoReconnect=true
1515
# username: postgres
16-
# password: 1229
16+
# password: postgres
1717
# driver-class-name: org.postgresql.Driver
1818
# secondary:
1919
# url: jdbc:postgresql://localhost:5432/secondary?currentSchema=public&useSSL=false&serverTimezone=GMT%2B8&autoReconnect=true
2020
# username: postgres
21-
# password: 1229
21+
# password: postgres
2222
# driver-class-name: org.postgresql.Driver
2323
# Hikari 连接池配置
2424
hikari:

myboot-demo-ganxu/ganxu-auth-api/src/main/resources/application-datasource-dev.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ spring:
55
# 使用p6spy
66
url: jdbc:p6spy:postgresql://postgres.host:5432/ganxu?currentSchema=ganxu&useSSL=false&serverTimezone=GMT%2B8&autoReconnect=true
77
username: postgres
8-
password: 1229
8+
password: postgres
99
#driver-class-name: org.postgresql.Driver
1010
# 使用p6spy 监控
1111
driver-class-name: com.p6spy.engine.spy.P6SpyDriver
@@ -14,12 +14,12 @@ spring:
1414
# primary:
1515
# url: jdbc:p6spy:postgresql://postgres.host:5432/ganxu?currentSchema=ganxu&useSSL=false&serverTimezone=GMT%2B8&autoReconnect=true
1616
# username: postgres
17-
# password: 1229
17+
# password: postgres
1818
# driver-class-name: com.p6spy.engine.spy.P6SpyDriver
1919
# secondary:
2020
# url: jdbc:p6spy:postgresql://postgres.host:5432/ganxu2?currentSchema=ganxu&useSSL=false&serverTimezone=GMT%2B8&autoReconnect=true
2121
# username: postgres
22-
# password: 1229
22+
# password: postgres
2323
# driver-class-name: com.p6spy.engine.spy.P6SpyDriver
2424
# Hikari 连接池配置
2525
hikari:

0 commit comments

Comments
 (0)