File tree Expand file tree Collapse file tree 3 files changed +32
-6
lines changed
api-boot-project/api-boot-starters/api-boot-starter-datasource-switch
api-boot-samples/api-boot-sample-datasource-switch Expand file tree Collapse file tree 3 files changed +32
-6
lines changed Original file line number Diff line number Diff line change 3434 <dependency >
3535 <groupId >org.springframework.boot</groupId >
3636 <artifactId >spring-boot-starter-jdbc</artifactId >
37+ <exclusions >
38+ <exclusion >
39+ <groupId >com.zaxxer</groupId >
40+ <artifactId >HikariCP</artifactId >
41+ </exclusion >
42+ </exclusions >
3743 </dependency >
3844 <dependency >
3945 <groupId >org.springframework.boot</groupId >
Original file line number Diff line number Diff line change 2121 <dependency >
2222 <groupId >org.minbox.framework</groupId >
2323 <artifactId >api-boot-starter-datasource-switch</artifactId >
24+ <exclusions >
25+ <exclusion >
26+ <groupId >org.minbox.framework</groupId >
27+ <artifactId >minbox-datasource-switch</artifactId >
28+ </exclusion >
29+ </exclusions >
30+ </dependency >
31+ <dependency >
32+ <groupId >org.minbox.framework</groupId >
33+ <artifactId >minbox-datasource-switch</artifactId >
34+ <version >1.0.1-SNAPSHOT</version >
2435 </dependency >
2536 <!-- SpringBoot Test-->
2637 <dependency >
3243 <groupId >mysql</groupId >
3344 <artifactId >mysql-connector-java</artifactId >
3445 </dependency >
46+ <dependency >
47+ <groupId >com.alibaba</groupId >
48+ <artifactId >druid</artifactId >
49+ </dependency >
50+ <dependency >
51+ <groupId >com.zaxxer</groupId >
52+ <artifactId >HikariCP</artifactId >
53+ </dependency >
3554 <!-- 性能测试依赖-->
3655 <dependency >
3756 <groupId >org.databene</groupId >
Original file line number Diff line number Diff line change 66 datasource :
77 # 默认的数据源,默认值为master
88 primary : master
9- # 配置使用hikari数据源
109 hikari :
10+ # slave 2
11+ slave_2 :
12+ url : jdbc:mysql://localhost:3306/iot-logging?characterEncoding=utf8&serverTimezone=Asia/Shanghai
13+ username : root
14+ password : 123456
15+ # 配置使用hikari数据源
16+ druid :
1117 # master datasource config
1218 master :
1319 url : jdbc:mysql://localhost:3306/test?characterEncoding=utf8&serverTimezone=Asia/Shanghai
2026 url : jdbc:mysql://localhost:3306/iot-oauth?characterEncoding=utf8&serverTimezone=Asia/Shanghai
2127 username : root
2228 password : 123456
23- # slave 2
24- slave_2 :
25- url : jdbc:mysql://localhost:3306/iot-logging?characterEncoding=utf8&serverTimezone=Asia/Shanghai
26- username : root
27- password : 123456
You can’t perform that action at this time.
0 commit comments