From 0208c795499b808c762edbb3d61432410692dd6e Mon Sep 17 00:00:00 2001
From: chenhj <chenhj@lunor.cn>
Date: 星期六, 24 五月 2025 14:50:15 +0800
Subject: [PATCH] Merge pull request 'chen' (#7) from chen into master

---
 ruoyi-admin/src/main/resources/application-druid.yml.example |   61 ++++++++++++++++++++++++++++++
 1 files changed, 61 insertions(+), 0 deletions(-)

diff --git a/ruoyi-admin/src/main/resources/application-druid.yml.example b/ruoyi-admin/src/main/resources/application-druid.yml.example
new file mode 100644
index 0000000..bb5cdec
--- /dev/null
+++ b/ruoyi-admin/src/main/resources/application-druid.yml.example
@@ -0,0 +1,61 @@
+# 鏁版嵁婧愰厤缃�
+spring:
+    datasource:
+        type: com.alibaba.druid.pool.DruidDataSource
+        driverClassName: com.mysql.cj.jdbc.Driver
+        druid:
+            # 涓诲簱鏁版嵁婧�
+            master:
+                url: jdbc:mysql://localhost:3306/ry-zd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: 123456
+            # 浠庡簱鏁版嵁婧�
+            slave:
+                # 浠庢暟鎹簮寮�鍏�/榛樿鍏抽棴
+                enabled: false
+                url: 
+                username: 
+                password: 
+            # 鍒濆杩炴帴鏁�
+            initialSize: 5
+            # 鏈�灏忚繛鎺ユ睜鏁伴噺
+            minIdle: 10
+            # 鏈�澶ц繛鎺ユ睜鏁伴噺
+            maxActive: 20
+            # 閰嶇疆鑾峰彇杩炴帴绛夊緟瓒呮椂鐨勬椂闂�
+            maxWait: 60000
+            # 閰嶇疆杩炴帴瓒呮椂鏃堕棿
+            connectTimeout: 30000
+            # 閰嶇疆缃戠粶瓒呮椂鏃堕棿
+            socketTimeout: 60000
+            # 閰嶇疆闂撮殧澶氫箙鎵嶈繘琛屼竴娆℃娴嬶紝妫�娴嬮渶瑕佸叧闂殑绌洪棽杩炴帴锛屽崟浣嶆槸姣
+            timeBetweenEvictionRunsMillis: 60000
+            # 閰嶇疆涓�涓繛鎺ュ湪姹犱腑鏈�灏忕敓瀛樼殑鏃堕棿锛屽崟浣嶆槸姣
+            minEvictableIdleTimeMillis: 300000
+            # 閰嶇疆涓�涓繛鎺ュ湪姹犱腑鏈�澶х敓瀛樼殑鏃堕棿锛屽崟浣嶆槸姣
+            maxEvictableIdleTimeMillis: 900000
+            # 閰嶇疆妫�娴嬭繛鎺ユ槸鍚︽湁鏁�
+            validationQuery: SELECT 1 FROM DUAL
+            testWhileIdle: true
+            testOnBorrow: false
+            testOnReturn: false
+            webStatFilter: 
+                enabled: true
+            statViewServlet:
+                enabled: true
+                # 璁剧疆鐧藉悕鍗曪紝涓嶅~鍒欏厑璁告墍鏈夎闂�
+                allow:
+                url-pattern: /druid/*
+                # 鎺у埗鍙扮鐞嗙敤鎴峰悕鍜屽瘑鐮�
+                login-username: ruoyi
+                login-password: 123456
+            filter:
+                stat:
+                    enabled: true
+                    # 鎱QL璁板綍
+                    log-slow-sql: true
+                    slow-sql-millis: 1000
+                    merge-sql: true
+                wall:
+                    config:
+                        multi-statement-allow: true
\ No newline at end of file

--
Gitblit v1.9.3