瀏覽代碼

多数据源配置:增加system

YangL 2 年之前
父節點
當前提交
0c4e730510
共有 2 個文件被更改,包括 25 次插入2 次删除
  1. 1 1
      src/main/resources/application.properties
  2. 24 1
      src/main/resources/application.yml

+ 1 - 1
src/main/resources/application.properties

@@ -78,4 +78,4 @@ logging.level.com.xxl.job=warn
 management.health.rabbit.enabled=false
 
 # ¶àÊý¾ÝÔ´ÅäÖÃ
-customDataSource=train
+customDataSource=train,system

+ 24 - 1
src/main/resources/application.yml

@@ -44,6 +44,29 @@ train:
     testOnReturn: false
     poolPreparedStatements: false
 
+system:
+  string:
+    url: ${system.datasource.url}
+    username: ${system.datasource.username}
+    password: ${system.datasource.password}
+    driverClassName: ${system.datasource.driver}
+    validationQuery: ${system.datasource.vaildQuery}
+    filters: stat
+  int:
+    initialSize: 5
+    minIdle: 5
+    maxActive: 100
+    maxPoolPreparedStatementPerConnectionSize: -1
+  long:
+    maxWait: 60000
+    timeBetweenEvictionRunsMillis: 60000
+    minEvictableIdleTimeMillis: 300000
+  boolean:
+    testWhileIdle: true
+    testOnBorrow: true
+    testOnReturn: false
+    poolPreparedStatements: false
+
 mybatis:
   mapper-locations: classpath:/mapper/**/*Mapper.xml
 
@@ -105,7 +128,7 @@ spring:
     nacos:
       discovery:
         metadata:
-          developer: ray
+          developer: yl
 #logging:
 #  level:
 #    root: info