Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
<exclusions>
<exclusion>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down
19 changes: 19 additions & 0 deletions api-boot-samples/api-boot-sample-datasource-switch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@
<dependency>
<groupId>org.minbox.framework</groupId>
<artifactId>api-boot-starter-datasource-switch</artifactId>
<exclusions>
<exclusion>
<groupId>org.minbox.framework</groupId>
<artifactId>minbox-datasource-switch</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.minbox.framework</groupId>
<artifactId>minbox-datasource-switch</artifactId>
<version>1.0.1-SNAPSHOT</version>
</dependency>
<!--SpringBoot Test-->
<dependency>
Expand All @@ -32,6 +43,14 @@
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
</dependency>
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
</dependency>
<!--性能测试依赖-->
<dependency>
<groupId>org.databene</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ api:
datasource:
# 默认的数据源,默认值为master
primary: master
# 配置使用hikari数据源
hikari:
# slave 2
slave_2:
url: jdbc:mysql://localhost:3306/iot-logging?characterEncoding=utf8&serverTimezone=Asia/Shanghai
username: root
password: 123456
# 配置使用hikari数据源
druid:
# master datasource config
master:
url: jdbc:mysql://localhost:3306/test?characterEncoding=utf8&serverTimezone=Asia/Shanghai
Expand All @@ -20,8 +26,3 @@ api:
url: jdbc:mysql://localhost:3306/iot-oauth?characterEncoding=utf8&serverTimezone=Asia/Shanghai
username: root
password: 123456
# slave 2
slave_2:
url: jdbc:mysql://localhost:3306/iot-logging?characterEncoding=utf8&serverTimezone=Asia/Shanghai
username: root
password: 123456