|
|
@@ -16,7 +16,7 @@ spring:
|
|
16
|
16
|
props:
|
|
17
|
17
|
path: D:/Standalone/depot-intelligent
|
|
18
|
18
|
datasource:
|
|
19
|
|
- names: depot-master-01,depot-slave-01
|
|
|
19
|
+ names: depot-master-01,depot-slave-01,depot-slave-02
|
|
20
|
20
|
depot-master-01:
|
|
21
|
21
|
type: com.zaxxer.hikari.HikariDataSource
|
|
22
|
22
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
|
@@ -29,6 +29,12 @@ spring:
|
|
29
|
29
|
jdbc-url: jdbc:mysql://172.16.0.9:3306/depot?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC
|
|
30
|
30
|
username: root
|
|
31
|
31
|
password: 123456
|
|
|
32
|
+ depot-slave-02:
|
|
|
33
|
+ type: com.zaxxer.hikari.HikariDataSource
|
|
|
34
|
+ driver-class-name: com.mysql.cj.jdbc.Driver
|
|
|
35
|
+ jdbc-url: jdbc:mysql://172.16.0.10:3306/depot?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC
|
|
|
36
|
+ username: root
|
|
|
37
|
+ password: 123456
|
|
32
|
38
|
rules:
|
|
33
|
39
|
readwrite-splitting:
|
|
34
|
40
|
data-sources:
|
|
|
@@ -36,7 +42,7 @@ spring:
|
|
36
|
42
|
type: Static
|
|
37
|
43
|
props:
|
|
38
|
44
|
write-data-source-name: depot-master-01
|
|
39
|
|
- read-data-source-names: depot-slave-01
|
|
|
45
|
+ read-data-source-names: depot-slave-01,depot-slave-02
|
|
40
|
46
|
load-balancer-name: depot_algorithm
|
|
41
|
47
|
load-balancers:
|
|
42
|
48
|
depot_algorithm:
|