File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed
Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change 4444 <groupId >org.springframework.boot</groupId >
4545 <artifactId >spring-boot-starter-jdbc</artifactId >
4646 </dependency >
47+ <!-- for spring boot -->
48+ <dependency >
49+ <groupId >org.apache.shardingsphere</groupId >
50+ <artifactId >sharding-jdbc-spring-boot-starter</artifactId >
51+ <version >4.1.1</version >
52+ </dependency >
53+ <!-- for spring namespace -->
54+ <dependency >
55+ <groupId >org.apache.shardingsphere</groupId >
56+ <artifactId >sharding-jdbc-spring-namespace</artifactId >
57+ <version >4.1.1</version >
58+ </dependency >
4759 <dependency >
4860 <groupId >org.springframework.boot</groupId >
4961 <artifactId >spring-boot-starter-web</artifactId >
Original file line number Diff line number Diff line change 1+ spring :
2+ shardingsphere :
3+ props :
4+ sql :
5+ show : true
6+ masterslave :
7+ name :
8+ master-data-source-name :
9+ slave-data-source-names :
10+ load-balance-algorithm-type : random
11+ datasource :
12+ names : master,slave0,slave1
13+ master :
14+ driverClassName : com.mysql.jdbc.Driver
15+ url : jdbc:mysql://localhost:3306/ds_master
16+ username : root
17+ password :
18+ type : org.apache.commons.dbcp.BasicDataSource
19+
20+ slave1 :
21+ driverClassName : com.mysql.jdbc.Driver
22+ url : jdbc:mysql://localhost:3316/ds_master
23+ username : root
24+ password :
25+ type : org.apache.commons.dbcp.BasicDataSource
26+
27+ slave2 :
28+ driverClassName : com.mysql.jdbc.Driver
29+ url : jdbc:mysql://localhost:3306/ds_master
30+ username : root
31+ password :
32+ type : org.apache.commons.dbcp.BasicDataSource
33+
You can’t perform that action at this time.
0 commit comments