File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
api-boot-samples/api-boot-sample-datasource-switch Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 8080 primary: main
8181 # 配置使用hikari数据源
8282 hikari:
83- # master datasource config
83+ # main datasource config
8484 main:
8585 url: jdbc:mysql://localhost:3306/test?characterEncoding=utf8&serverTimezone=Asia/Shanghai
8686 username: root
@@ -106,12 +106,12 @@ api:
106106 password: 123456
107107 # 默认值为【com.mysql.cj.jdbc.Driver】
108108 #driver-class-name: com.mysql.cj.jdbc.Driver
109- # slave 1
109+ # slave 1 datasource config
110110 slave_1:
111111 url: jdbc:mysql://localhost:3306/oauth2?characterEncoding=utf8&serverTimezone=Asia/Shanghai
112112 username: root
113113 password: 123456
114- # slave 2
114+ # slave 2 datasource config
115115 slave_2:
116116 url: jdbc:mysql://localhost:3306/resources?characterEncoding=utf8&serverTimezone=Asia/Shanghai
117117 username: root
127127` ` ` yaml
128128api:
129129 boot:
130- # 主数据源,默认值为master
130+ # 主数据源,默认值为master
131131 primary: mysql
132132 hikari:
133133 mysql:
You can’t perform that action at this time.
0 commit comments