From 86fd4ec5fd97081f212e4c35523ee3d44f233fb6 Mon Sep 17 00:00:00 2001
From: cl <1442464845@qq.com>
Date: 星期五, 17 四月 2026 17:07:04 +0800
Subject: [PATCH] 配置多数据源
---
rsf-server/src/main/resources/application-prod.yml | 38 ++++++++++++++++++++++----------------
1 files changed, 22 insertions(+), 16 deletions(-)
diff --git a/rsf-server/src/main/resources/application-prod.yml b/rsf-server/src/main/resources/application-prod.yml
index d43b3bb..13cf3f1 100644
--- a/rsf-server/src/main/resources/application-prod.yml
+++ b/rsf-server/src/main/resources/application-prod.yml
@@ -21,14 +21,14 @@
password: xltys1995
type: com.alibaba.druid.pool.DruidDataSource
druid:
- initial-size: 5
- min-idle: 5
- max-active: 20
- max-wait: 30000
+ initial-size: 3
+ min-idle: 8
+ max-active: 40
+ max-wait: 10000
time-between-eviction-runs-millis: 60000
min-evictable-idle-time-millis: 300000
test-while-idle: true
- test-on-borrow: true
+ test-on-borrow: false
test-on-return: false
remove-abandoned: true
remove-abandoned-timeout: 1800
@@ -43,6 +43,21 @@
login-username: admin
login-password: admin
enabled: true
+ # 澶氭暟鎹簮锛歝us_item_sync_view 涓撶敤搴�
+ cus-item-sync:
+ type: com.alibaba.druid.pool.DruidDataSource
+ driver-class-name: com.mysql.cj.jdbc.Driver
+# url: jdbc:mysql://127.0.0.1:3306/rsf_jdxaj?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+# username: root
+# password: xltys1995
+# url: jdbc:mysql://192.168.10.108:3306/ilc_wms_prod?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+ url: jdbc:mysql://192.168.10.108:3306/ilc_wms_test?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+ username: root
+ password: "Gsyywm@2020.com"
+ initial-size: 1
+ min-idle: 2
+ max-active: 12
+ max-wait: 10000
servlet:
multipart:
maxFileSize: 100MB
@@ -72,17 +87,6 @@
database: 3
index: 3
-# 浠� cus_item_sync_view锛泆rl 涓嶉厤缃椂浠嶆煡涓诲簱銆傚簱鍚嶄笌璐﹀彿鎸夌敓浜х幆澧冧慨鏀�
-cus-item-sync:
- datasource:
-# url: jdbc:mysql://127.0.0.1:3306/rsf_jdxaj?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
-# username: root
-# password: xltys1995
-# url: jdbc:mysql://192.168.10.108:3306/ilc_wms_prod?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
- url: jdbc:mysql://192.168.10.108:3306/ilc_wms_test?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
- username: root
- password: "Gsyywm@2020.com"
- driver-class-name: com.mysql.cj.jdbc.Driver
#骞冲彴鎺ュ彛淇℃伅閰嶇疆(濡傦細ERP, QMS, WCS绛�)
platform:
@@ -132,6 +136,8 @@
# rule-cache-refresh-ms锛氳鍒欒〃缂撳瓨鍒锋柊闂撮殧锛堟绉掞級
http-audit:
enabled: true
+ # 瀹¤鏁版嵁婧愶細primary / cus-item-sync
+ datasource: primary
whitelist-only: true
# false锛�/httpAuditLog銆�/httpAuditRule 涔熶細琚� Filter 璁板綍锛堣皟璇曠敤锛涚敓浜у缓璁� true锛�
exclude-audit-self-paths: false
--
Gitblit v1.9.1