From 70c1a37bbd95bd3850d23c902fbe82aaf835adae Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期五, 22 四月 2022 12:16:03 +0800
Subject: [PATCH] update 删除一些基本用不上的配置 简化折叠一些配置
---
ruoyi-admin/src/main/resources/application-prod.yml | 123 ++++++++++--------------
ruoyi-framework/src/main/java/com/ruoyi/framework/config/RedisConfig.java | 16 ---
ruoyi-framework/src/main/java/com/ruoyi/framework/config/properties/RedissonProperties.java | 31 ------
ruoyi-admin/src/main/resources/application.yml | 10 --
ruoyi-admin/src/main/resources/application-dev.yml | 115 ++++++++++-------------
5 files changed, 103 insertions(+), 192 deletions(-)
diff --git a/ruoyi-admin/src/main/resources/application-dev.yml b/ruoyi-admin/src/main/resources/application-dev.yml
index d5994e4..45eb5be 100644
--- a/ruoyi-admin/src/main/resources/application-dev.yml
+++ b/ruoyi-admin/src/main/resources/application-dev.yml
@@ -1,41 +1,34 @@
---- # 鐩戞帶閰嶇疆
-spring:
- boot:
- admin:
- # Spring Boot Admin Client 瀹㈡埛绔殑鐩稿叧閰嶇疆
- client:
- # 澧炲姞瀹㈡埛绔紑鍏�
- enabled: true
- # 璁剧疆 Spring Boot Admin Server 鍦板潃
- url: http://localhost:9090/admin
- instance:
- service-host-type: IP
- username: ruoyi
- password: 123456
+--- # 鐩戞帶涓績閰嶇疆
+spring.boot.admin.client:
+ # 澧炲姞瀹㈡埛绔紑鍏�
+ enabled: true
+ url: http://localhost:9090/admin
+ instance:
+ service-host-type: IP
+ username: ruoyi
+ password: 123456
--- # xxl-job 閰嶇疆
-xxl:
- job:
- # 鎵ц鍣ㄥ紑鍏�
- enabled: true
- # 璋冨害涓績鍦板潃锛氬璋冨害涓績闆嗙兢閮ㄧ讲瀛樺湪澶氫釜鍦板潃鍒欑敤閫楀彿鍒嗛殧銆�
- admin-addresses: http://localhost:9100/xxl-job-admin
- # 鎵ц鍣ㄩ�氳TOKEN锛氶潪绌烘椂鍚敤
- access-token: xxl-job
- # 鎵ц鍣ㄩ厤缃�
- executor:
- # 鎵ц鍣ˋppName锛氭墽琛屽櫒蹇冭烦娉ㄥ唽鍒嗙粍渚濇嵁锛涗负绌哄垯鍏抽棴鑷姩娉ㄥ唽
- appname: xxl-job-executor
- # 鎵ц鍣ㄧ鍙e彿 鎵ц鍣ㄤ粠9101寮�濮嬪線鍚庡啓
- port: 9101
- # 鎵ц鍣ㄦ敞鍐岋細榛樿IP:PORT
- address:
- # 鎵ц鍣↖P锛氶粯璁よ嚜鍔ㄨ幏鍙朓P
- ip:
- # 鎵ц鍣ㄨ繍琛屾棩蹇楁枃浠跺瓨鍌ㄧ鐩樿矾寰�
- logpath: ./logs/xxl-job
- # 鎵ц鍣ㄦ棩蹇楁枃浠朵繚瀛樺ぉ鏁帮細澶т簬3鐢熸晥
- logretentiondays: 30
+xxl.job:
+ # 鎵ц鍣ㄥ紑鍏�
+ enabled: true
+ # 璋冨害涓績鍦板潃锛氬璋冨害涓績闆嗙兢閮ㄧ讲瀛樺湪澶氫釜鍦板潃鍒欑敤閫楀彿鍒嗛殧銆�
+ admin-addresses: http://localhost:9100/xxl-job-admin
+ # 鎵ц鍣ㄩ�氳TOKEN锛氶潪绌烘椂鍚敤
+ access-token: xxl-job
+ executor:
+ # 鎵ц鍣ˋppName锛氭墽琛屽櫒蹇冭烦娉ㄥ唽鍒嗙粍渚濇嵁锛涗负绌哄垯鍏抽棴鑷姩娉ㄥ唽
+ appname: xxl-job-executor
+ # 鎵ц鍣ㄧ鍙e彿 鎵ц鍣ㄤ粠9101寮�濮嬪線鍚庡啓
+ port: 9101
+ # 鎵ц鍣ㄦ敞鍐岋細榛樿IP:PORT
+ address:
+ # 鎵ц鍣↖P锛氶粯璁よ嚜鍔ㄨ幏鍙朓P
+ ip:
+ # 鎵ц鍣ㄨ繍琛屾棩蹇楁枃浠跺瓨鍌ㄧ鐩樿矾寰�
+ logpath: ./logs/xxl-job
+ # 鎵ц鍣ㄦ棩蹇楁枃浠朵繚瀛樺ぉ鏁帮細澶т簬3鐢熸晥
+ logretentiondays: 30
--- # 鏁版嵁婧愰厤缃�
spring:
@@ -106,29 +99,27 @@
filters: stat
--- # druid 閰嶇疆
-spring:
- datasource:
- druid:
- 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
+spring.datasource.druid:
+ 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
--- # redis 鍗曟満閰嶇疆(鍗曟満涓庨泦缇ゅ彧鑳藉紑鍚竴涓彟涓�涓渶瑕佹敞閲婃帀)
spring:
@@ -151,8 +142,6 @@
threads: 4
# Netty绾跨▼姹犳暟閲�
nettyThreads: 8
- # 浼犺緭妯″紡
- transportMode: "NIO"
# 鍗曡妭鐐归厤缃�
singleServerConfig:
# 瀹㈡埛绔悕绉�
@@ -165,9 +154,5 @@
idleConnectionTimeout: 10000
# 鍛戒护绛夊緟瓒呮椂锛屽崟浣嶏細姣
timeout: 3000
- # 濡傛灉灏濊瘯鍦ㄦ闄愬埗涔嬪唴鍙戦�佹垚鍔燂紝鍒欏紑濮嬪惎鐢� timeout 璁℃椂銆�
- retryAttempts: 3
- # 鍛戒护閲嶈瘯鍙戦�佹椂闂撮棿闅旓紝鍗曚綅锛氭绉�
- retryInterval: 1500
# 鍙戝竷鍜岃闃呰繛鎺ユ睜澶у皬
subscriptionConnectionPoolSize: 50
diff --git a/ruoyi-admin/src/main/resources/application-prod.yml b/ruoyi-admin/src/main/resources/application-prod.yml
index 0b9b987..6a28bcc 100644
--- a/ruoyi-admin/src/main/resources/application-prod.yml
+++ b/ruoyi-admin/src/main/resources/application-prod.yml
@@ -1,48 +1,37 @@
---- # 閰嶇疆涓存椂璺緞瀛樺偍
-spring:
- servlet:
- multipart:
- # 涓存椂鏂囦欢瀛樺偍浣嶇疆 閬垮厤涓存椂鏂囦欢琚郴缁熸竻鐞嗘姤閿�
- location: /ruoyi/server/temp
+--- # 涓存椂鏂囦欢瀛樺偍浣嶇疆 閬垮厤涓存椂鏂囦欢琚郴缁熸竻鐞嗘姤閿�
+spring.servlet.multipart.location: /ruoyi/server/temp
---- # 鐩戞帶閰嶇疆
-spring:
- boot:
- admin:
- # Spring Boot Admin Client 瀹㈡埛绔殑鐩稿叧閰嶇疆
- client:
- # 澧炲姞瀹㈡埛绔紑鍏�
- enabled: true
- # 璁剧疆 Spring Boot Admin Server 鍦板潃
- url: http://172.30.0.90:9090/admin
- instance:
- service-host-type: IP
- username: ruoyi
- password: 123456
+--- # 鐩戞帶涓績閰嶇疆
+spring.boot.admin.client:
+ # 澧炲姞瀹㈡埛绔紑鍏�
+ enabled: true
+ url: http://172.30.0.90:9090/admin
+ instance:
+ service-host-type: IP
+ username: ruoyi
+ password: 123456
--- # xxl-job 閰嶇疆
-xxl:
- job:
- # 鎵ц鍣ㄥ紑鍏�
- enabled: true
- # 璋冨害涓績鍦板潃锛氬璋冨害涓績闆嗙兢閮ㄧ讲瀛樺湪澶氫釜鍦板潃鍒欑敤閫楀彿鍒嗛殧銆�
- admin-addresses: http://172.30.0.92:9100/xxl-job-admin
- # 鎵ц鍣ㄩ�氳TOKEN锛氶潪绌烘椂鍚敤
- access-token: xxl-job
- # 鎵ц鍣ㄩ厤缃�
- executor:
- # 鎵ц鍣ˋppName锛氭墽琛屽櫒蹇冭烦娉ㄥ唽鍒嗙粍渚濇嵁锛涗负绌哄垯鍏抽棴鑷姩娉ㄥ唽
- appname: xxl-job-executor
- # 鎵ц鍣ㄧ鍙e彿 鎵ц鍣ㄤ粠9101寮�濮嬪線鍚庡啓
- port: 9101
- # 鎵ц鍣ㄦ敞鍐岋細榛樿IP:PORT
- address:
- # 鎵ц鍣↖P锛氶粯璁よ嚜鍔ㄨ幏鍙朓P
- ip:
- # 鎵ц鍣ㄨ繍琛屾棩蹇楁枃浠跺瓨鍌ㄧ鐩樿矾寰�
- logpath: ./logs/xxl-job
- # 鎵ц鍣ㄦ棩蹇楁枃浠朵繚瀛樺ぉ鏁帮細澶т簬3鐢熸晥
- logretentiondays: 30
+xxl.job:
+ # 鎵ц鍣ㄥ紑鍏�
+ enabled: true
+ # 璋冨害涓績鍦板潃锛氬璋冨害涓績闆嗙兢閮ㄧ讲瀛樺湪澶氫釜鍦板潃鍒欑敤閫楀彿鍒嗛殧銆�
+ admin-addresses: http://172.30.0.92:9100/xxl-job-admin
+ # 鎵ц鍣ㄩ�氳TOKEN锛氶潪绌烘椂鍚敤
+ access-token: xxl-job
+ executor:
+ # 鎵ц鍣ˋppName锛氭墽琛屽櫒蹇冭烦娉ㄥ唽鍒嗙粍渚濇嵁锛涗负绌哄垯鍏抽棴鑷姩娉ㄥ唽
+ appname: xxl-job-executor
+ # 鎵ц鍣ㄧ鍙e彿 鎵ц鍣ㄤ粠9101寮�濮嬪線鍚庡啓
+ port: 9101
+ # 鎵ц鍣ㄦ敞鍐岋細榛樿IP:PORT
+ address:
+ # 鎵ц鍣↖P锛氶粯璁よ嚜鍔ㄨ幏鍙朓P
+ ip:
+ # 鎵ц鍣ㄨ繍琛屾棩蹇楁枃浠跺瓨鍌ㄧ鐩樿矾寰�
+ logpath: ./logs/xxl-job
+ # 鎵ц鍣ㄦ棩蹇楁枃浠朵繚瀛樺ぉ鏁帮細澶т簬3鐢熸晥
+ logretentiondays: 30
--- # 鏁版嵁婧愰厤缃�
spring:
@@ -113,29 +102,27 @@
filters: stat
--- # druid 閰嶇疆
-spring:
- datasource:
- druid:
- 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
+spring.datasource.druid:
+ 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
--- # redis 鍗曟満閰嶇疆(鍗曟満涓庨泦缇ゅ彧鑳藉紑鍚竴涓彟涓�涓渶瑕佹敞閲婃帀)
spring:
@@ -158,8 +145,6 @@
threads: 16
# Netty绾跨▼姹犳暟閲�
nettyThreads: 32
- # 浼犺緭妯″紡
- transportMode: "NIO"
# 鍗曡妭鐐归厤缃�
singleServerConfig:
# 瀹㈡埛绔悕绉�
@@ -172,9 +157,5 @@
idleConnectionTimeout: 10000
# 鍛戒护绛夊緟瓒呮椂锛屽崟浣嶏細姣
timeout: 3000
- # 濡傛灉灏濊瘯鍦ㄦ闄愬埗涔嬪唴鍙戦�佹垚鍔燂紝鍒欏紑濮嬪惎鐢� timeout 璁℃椂銆�
- retryAttempts: 3
- # 鍛戒护閲嶈瘯鍙戦�佹椂闂撮棿闅旓紝鍗曚綅锛氭绉�
- retryInterval: 1500
# 鍙戝竷鍜岃闃呰繛鎺ユ睜澶у皬
subscriptionConnectionPoolSize: 50
diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml
index db983f2..c692fc2 100644
--- a/ruoyi-admin/src/main/resources/application.yml
+++ b/ruoyi-admin/src/main/resources/application.yml
@@ -75,10 +75,6 @@
restart:
# 鐑儴缃插紑鍏�
enabled: true
- # 涓巚ue鏁村悎閮ㄧ讲浣跨敤
- thymeleaf:
- # 灏嗙郴缁熸ā鏉挎斁缃埌鏈�鍓嶉潰 鍚﹀垯浼氫笌 springboot-admin 椤甸潰鍐茬獊
- template-resolver-order: 1
mvc:
pathmatch:
# 閫傞厤 boot 2.6 璺敱涓� springfox 鍏煎
@@ -107,16 +103,12 @@
is-concurrent: true
# 鍦ㄥ浜虹櫥褰曞悓涓�璐﹀彿鏃讹紝鏄惁鍏辩敤涓�涓猼oken (涓簍rue鏃舵墍鏈夌櫥褰曞叡鐢ㄤ竴涓猼oken, 涓篺alse鏃舵瘡娆$櫥褰曟柊寤轰竴涓猼oken)
is-share: false
- # 鏄惁灏濊瘯浠庤姹備綋閲岃鍙杢oken
- is-read-body: false
# 鏄惁灏濊瘯浠巋eader閲岃鍙杢oken
is-read-head: true
# 鏄惁灏濊瘯浠巆ookie閲岃鍙杢oken
is-read-cookie: false
# token鍓嶇紑
token-prefix: "Bearer"
- # token椋庢牸
- token-style: uuid
# jwt绉橀挜
jwt-secret-key: abcdefghijklmnopqrstuvwxyz
# 鏄惁杈撳嚭鎿嶄綔鏃ュ織
@@ -282,8 +274,6 @@
management:
endpoints:
web:
- # Actuator 鎻愪緵鐨� API 鎺ュ彛鐨勬牴鐩綍銆傞粯璁や负 /actuator
- base-path: /actuator
exposure:
# 闇�瑕佸紑鏀剧殑绔偣銆傞粯璁ゅ�煎彧鎵撳紑 health 鍜� info 涓や釜绔偣銆傞�氳繃璁剧疆 * 锛屽彲浠ュ紑鏀炬墍鏈夌鐐广��
# 鐢熶骇鐜涓嶅缓璁斁寮�鎵�鏈� 鏍规嵁椤圭洰闇�姹傛斁寮�鍗冲彲
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/RedisConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/RedisConfig.java
index a8bec41..da18cfd 100644
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/RedisConfig.java
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/RedisConfig.java
@@ -53,8 +53,7 @@
Config config = new Config();
config.setThreads(redissonProperties.getThreads())
.setNettyThreads(redissonProperties.getNettyThreads())
- .setCodec(JsonJacksonCodec.INSTANCE)
- .setTransportMode(redissonProperties.getTransportMode());
+ .setCodec(JsonJacksonCodec.INSTANCE);
RedissonProperties.SingleServerConfig singleServerConfig = redissonProperties.getSingleServerConfig();
if (ObjectUtil.isNotNull(singleServerConfig)) {
@@ -65,8 +64,6 @@
.setDatabase(redisProperties.getDatabase())
.setPassword(StringUtils.isNotBlank(redisProperties.getPassword()) ? redisProperties.getPassword() : null)
.setTimeout(singleServerConfig.getTimeout())
- .setRetryAttempts(singleServerConfig.getRetryAttempts())
- .setRetryInterval(singleServerConfig.getRetryInterval())
.setClientName(singleServerConfig.getClientName())
.setIdleConnectionTimeout(singleServerConfig.getIdleConnectionTimeout())
.setSubscriptionConnectionPoolSize(singleServerConfig.getSubscriptionConnectionPoolSize())
@@ -87,11 +84,8 @@
.setConnectTimeout(((Long) redisProperties.getTimeout().toMillis()).intValue())
.setPassword(StringUtils.isNotBlank(redisProperties.getPassword()) ? redisProperties.getPassword() : null)
.setTimeout(clusterServersConfig.getTimeout())
- .setRetryAttempts(clusterServersConfig.getRetryAttempts())
- .setRetryInterval(clusterServersConfig.getRetryInterval())
.setClientName(clusterServersConfig.getClientName())
.setIdleConnectionTimeout(clusterServersConfig.getIdleConnectionTimeout())
- .setPingConnectionInterval(clusterServersConfig.getPingConnectionInterval())
.setSubscriptionConnectionPoolSize(clusterServersConfig.getSubscriptionConnectionPoolSize())
.setMasterConnectionMinimumIdleSize(clusterServersConfig.getMasterConnectionMinimumIdleSize())
.setMasterConnectionPoolSize(clusterServersConfig.getMasterConnectionPoolSize())
@@ -144,8 +138,6 @@
* threads: 16
* # Netty绾跨▼姹犳暟閲�
* nettyThreads: 32
- * # 浼犺緭妯″紡
- * transportMode: "NIO"
* # 闆嗙兢閰嶇疆
* clusterServersConfig:
* # 瀹㈡埛绔悕绉�
@@ -160,14 +152,8 @@
* slaveConnectionPoolSize: 64
* # 杩炴帴绌洪棽瓒呮椂锛屽崟浣嶏細姣
* idleConnectionTimeout: 10000
- * # ping杩炴帴闂撮殧
- * pingConnectionInterval: 1000
* # 鍛戒护绛夊緟瓒呮椂锛屽崟浣嶏細姣
* timeout: 3000
- * # 濡傛灉灏濊瘯鍦ㄦ闄愬埗涔嬪唴鍙戦�佹垚鍔燂紝鍒欏紑濮嬪惎鐢� timeout 璁℃椂銆�
- * retryAttempts: 3
- * # 鍛戒护閲嶈瘯鍙戦�佹椂闂撮棿闅旓紝鍗曚綅锛氭绉�
- * retryInterval: 1500
* # 鍙戝竷鍜岃闃呰繛鎺ユ睜澶у皬
* subscriptionConnectionPoolSize: 50
* # 璇诲彇妯″紡
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/properties/RedissonProperties.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/properties/RedissonProperties.java
index eae9e3f..cd320eb 100644
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/properties/RedissonProperties.java
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/properties/RedissonProperties.java
@@ -4,7 +4,6 @@
import lombok.NoArgsConstructor;
import org.redisson.config.ReadMode;
import org.redisson.config.SubscriptionMode;
-import org.redisson.config.TransportMode;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
@@ -29,11 +28,6 @@
* Netty绾跨▼姹犳暟閲�,榛樿鍊� = 褰撳墠澶勭悊鏍告暟閲� * 2
*/
private int nettyThreads;
-
- /**
- * 浼犺緭妯″紡
- */
- private TransportMode transportMode;
/**
* 鍗曟満鏈嶅姟閰嶇疆
@@ -80,16 +74,6 @@
private int timeout;
/**
- * 濡傛灉灏濊瘯鍦ㄦ闄愬埗涔嬪唴鍙戦�佹垚鍔燂紝鍒欏紑濮嬪惎鐢� timeout 璁℃椂銆�
- */
- private int retryAttempts;
-
- /**
- * 鍛戒护閲嶈瘯鍙戦�佹椂闂撮棿闅旓紝鍗曚綅锛氭绉�
- */
- private int retryInterval;
-
- /**
* 鍙戝竷鍜岃闃呰繛鎺ユ睜澶у皬
*/
private int subscriptionConnectionPoolSize;
@@ -131,24 +115,9 @@
private int idleConnectionTimeout;
/**
- * ping瓒呮椂
- */
- private int pingConnectionInterval;
-
- /**
* 鍛戒护绛夊緟瓒呮椂锛屽崟浣嶏細姣
*/
private int timeout;
-
- /**
- * 濡傛灉灏濊瘯鍦ㄦ闄愬埗涔嬪唴鍙戦�佹垚鍔燂紝鍒欏紑濮嬪惎鐢� timeout 璁℃椂銆�
- */
- private int retryAttempts;
-
- /**
- * 鍛戒护閲嶈瘯鍙戦�佹椂闂撮棿闅旓紝鍗曚綅锛氭绉�
- */
- private int retryInterval;
/**
* 鍙戝竷鍜岃闃呰繛鎺ユ睜澶у皬
--
Gitblit v1.9.3