From 56176807796365e1cdab78f1529d64a8e56921b7 Mon Sep 17 00:00:00 2001
From: zhuo <2089219845@qq.com>
Date: 星期二, 04 三月 2025 11:35:54 +0800
Subject: [PATCH] 配置文件调整
---
ruoyi-admin/src/main/resources/application-prod.yml | 110 ++++++++++++++++++++++++++++++++++++
ruoyi-admin/src/main/resources/application-druid.yml | 3 -
ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java | 4 -
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java | 2
ruoyi-admin/src/main/resources/application.yml | 6 +-
5 files changed, 114 insertions(+), 11 deletions(-)
diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml
index 33a491d..f466a7f 100644
--- a/ruoyi-admin/src/main/resources/application-druid.yml
+++ b/ruoyi-admin/src/main/resources/application-druid.yml
@@ -72,14 +72,11 @@
# 鐓х墖瀛樺偍璺緞+++++++++++++++++++++++++++杩愮淮闇�瑕侀厤缃�+++++++++++++++++++++++++++
file:
path: D:\椤圭洰鏂囦欢瀛樺偍\image
- # 杞琾df鏂囦欢璺緞
- licenseUrl: D:\20892\Desktop\lims\code\center-lims-after\inspect-server\src\main\resources\lib\license.xml
# 涓婁紶鏂囦欢鍏佽鐨勬墿灞曞悕
allowed: png,jpg,jpeg,gif
wordUrl: D:\椤圭洰鏂囦欢瀛樺偍\word
twoCode: D:\椤圭洰鏂囦欢瀛樺偍\two_code
-outPath: D:\椤圭洰鏂囦欢瀛樺偍\image
#oa:
diff --git a/ruoyi-admin/src/main/resources/application-prod.yml b/ruoyi-admin/src/main/resources/application-prod.yml
new file mode 100644
index 0000000..32be6bd
--- /dev/null
+++ b/ruoyi-admin/src/main/resources/application-prod.yml
@@ -0,0 +1,110 @@
+# 鏁版嵁婧愰厤缃�
+spring:
+ datasource:
+ type: com.alibaba.druid.pool.DruidDataSource
+ driverClassName: com.mysql.cj.jdbc.Driver
+ druid:
+ # 涓诲簱鏁版嵁婧�
+ master:
+ url: jdbc:mysql://114.132.189.42:9004/lims-ruoyi-test?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
+
+
+minio:
+ endpoint: http://114.132.189.42/
+ port: 7019
+ secure: false
+ accessKey: admin
+ secretKey: 12345678
+ preview-expiry: 24 # 棰勮鍦板潃榛樿24灏忔椂
+
+# 鐓х墖瀛樺偍璺緞+++++++++++++++++++++++++++杩愮淮闇�瑕侀厤缃�+++++++++++++++++++++++++++
+file:
+ path: /javaWork/lims-ruoyi/file/img
+ # 涓婁紶鏂囦欢鍏佽鐨勬墿灞曞悕
+ allowed: png,jpg,jpeg,gif
+
+wordUrl: /javaWork/lims-ruoyi/file/word
+twoCode: /javaWork/lims-ruoyi/file/two_code
+
+
+#oa:
+# oaHost: http://192.168.0.49:8000/oa_workflowrequest.asmx?wsdl
+# prodIp: http://192.168.21.53:8081
+# unqualifiedProcessId: 41974
+
+wechat:
+ # 璐ㄩ噺鎶ユ閫氱煡
+ examiningUrl: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=21993616-9966-4fe4-81b0-68e99a40c964
+
+ifs:
+ contract: ZTZB
+ contract-key-get: 4ttDeLKNsZuhstjtROMcRE1USNFXKdFYE7lQ2p1m5Bo=
+ contract-key-post: 4ttDeLKNsZuhstjtROMcRE1USNFXKdFYE7lQ2p1m5Bo=
+ custorder: http://192.168.20.47/PurchService.ashx?
+ custorder-port: http://192.168.20.47:8008/PurchService.ashx?
+ erp-services: http://192.168.20.47:8081
+
+# 澶囨敞 18083瀵嗙爜锛歾ttZTT123!@
+mqtt:
+ url: tcp://mqtt-ztt.zttiot.com:1883 # 鏈嶅姟鍣╥p
+ username: forwarder # MQTT-鏈嶅姟绔�-鐢ㄦ埛鍚�,鍚庢湡浼氫慨鏀逛负鐢ㄦ埛鐧诲綍鍚�
+ password: ZTlink12345 # MQTT-鏈嶅姟绔�-瀵嗙爜锛�,鍚庢湡浼氫慨鏀逛负鐢ㄦ埛鐧诲綍瀵嗙爜
+ timeout: 100 # 瓒呮椂鏃堕棿 锛堝崟浣嶏細绉掞級
+ keepalive: 60 # 蹇冭烦 锛堝崟浣嶏細绉掞級
+ qos: 1 # 蹇冭烦鍖呯骇鍒�
+ completion-timeout: 3000 # 杩炴帴瓒呮椂鏃堕棿锛堝崟浣嶏細绉掞級
+ clientId: javaPublish # clientId
+ subscribe: /ztt/v3/2443521/publish # 璁㈤槄涓婚
+ client: false # 濡傛灉寮�鍙戦渶瑕佸惎鍔ㄦ祴璇曪紝闇�瑕佹敼涓篺alse涓嶇劧浼氫竴鐩存姤閿�
diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml
index acdb6fb..8a825d3 100644
--- a/ruoyi-admin/src/main/resources/application.yml
+++ b/ruoyi-admin/src/main/resources/application.yml
@@ -7,7 +7,7 @@
# 鐗堟潈骞翠唤
copyrightYear: 2025
# 鏂囦欢璺緞 绀轰緥锛� Windows閰嶇疆D:/ruoyi/uploadPath锛孡inux閰嶇疆 /home/ruoyi/uploadPath锛�
- profile: D:/ruoyi/uploadPath
+ profile: /javaWork/lims-ruoyi/file/uploadPath
# 鑾峰彇ip鍦板潃寮�鍏�
addressEnabled: false
# 楠岃瘉鐮佺被鍨� math 鏁板瓧璁$畻 char 瀛楃楠岃瘉
@@ -78,8 +78,8 @@
port: 6379
# 鏁版嵁搴撶储寮�
database: 0
- # 瀵嗙爜
-# password: 123456
+# # 瀵嗙爜
+# password: root2022!
# 杩炴帴瓒呮椂鏃堕棿
timeout: 10s
lettuce:
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java
index d6e6f9e..11e3b57 100644
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java
@@ -43,9 +43,6 @@
@Value("${file.path}")
private String filePath;
- @Value("${outPath}")
- private String outPath;
-
@Value("${wordUrl}")
private String wordUrl;
@@ -62,7 +59,6 @@
//璁剧疆鏂囦欢铏氭嫙璺緞鏄犲皠
registry.addResourceHandler("/img/**").addResourceLocations("file:" + filePath + "/");
- registry.addResourceHandler("/outPath/**").addResourceLocations("file:" + outPath);
registry.addResourceHandler("/word/**").addResourceLocations("file:" + wordUrl + "/");
}
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
index 95e2e17..1823e03 100644
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
@@ -113,7 +113,7 @@
// 瀵逛簬鐧诲綍login 娉ㄥ唽register 楠岃瘉鐮乧aptchaImage 鍏佽鍖垮悕璁块棶
requests.antMatchers("/login", "/register", "/captchaImage").permitAll()
// 闈欐�佽祫婧愶紝鍙尶鍚嶈闂�
- .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**", "/img/**", "/outPath/**", "/word/**").permitAll()
+ .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**", "/img/**", "/word/**").permitAll()
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
// 闄や笂闈㈠鐨勬墍鏈夎姹傚叏閮ㄩ渶瑕侀壌鏉冭璇�
.anyRequest().authenticated();
--
Gitblit v1.9.3