增加数据库主备自动切换功能
This commit is contained in:
parent
dc688f1e5f
commit
ce1bdc85a8
1
pom.xml
1
pom.xml
@ -53,6 +53,7 @@
|
||||
<artifactId>druid-spring-boot-starter</artifactId>
|
||||
<version>${druid.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
|
@ -27,11 +27,12 @@ spring:
|
||||
datasource:
|
||||
druid:
|
||||
url: jdbc:mysql://127.0.0.1:3306/db_smart_city_usercenter?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false&serverTimezone=UTC&nullCatalogMeansCurrent=true
|
||||
# standby-url: jdbc:mysql://192.168.0.151:3306/db_smart_city_usercenter?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false&serverTimezone=UTC&nullCatalogMeansCurrent=true
|
||||
db-type: mysql
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
username: root
|
||||
password: root
|
||||
initial-size: 2
|
||||
initial-size: 1
|
||||
min-idle: 2
|
||||
max-active: 5
|
||||
max-wait: 60000
|
||||
|
Loading…
Reference in New Issue
Block a user