From 457e566525d57ce0904e00aab9298ab0693ad5a1 Mon Sep 17 00:00:00 2001
From: aijinhui <aijinhui>
Date: 星期五, 24 十一月 2023 15:48:12 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
ard-work/pom.xml | 1
ruoyi-admin/src/main/resources/mybatis/mybatis-config.xml | 18 +-
ruoyi-admin/pom.xml | 1
ruoyi-admin/src/main/resources/application-prod.yml | 57 +------
ard-work/src/main/java/com/ruoyi/cmd/startup.java | 32 ----
ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java | 18 +-
pom.xml | 16 --
ruoyi-admin/src/main/resources/application.yml | 71 +++++----
ruoyi-common/src/main/java/com/ruoyi/common/filter/MyI18nInterceptor.java | 6
ruoyi-admin/src/main/resources/application-dev.yml | 171 +++++++++--------------
10 files changed, 144 insertions(+), 247 deletions(-)
diff --git a/ard-work/pom.xml b/ard-work/pom.xml
index 1643120..24e4683 100644
--- a/ard-work/pom.xml
+++ b/ard-work/pom.xml
@@ -69,7 +69,6 @@
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
- <version>3.0.3</version>
</dependency>
<!--寮犲缓鎻愪緵寮曞渚濊禆-->
<dependency>
diff --git a/ard-work/src/main/java/com/ruoyi/cmd/startup.java b/ard-work/src/main/java/com/ruoyi/cmd/startup.java
index 8466eda..8e41c40 100644
--- a/ard-work/src/main/java/com/ruoyi/cmd/startup.java
+++ b/ard-work/src/main/java/com/ruoyi/cmd/startup.java
@@ -45,12 +45,6 @@
String mediamtxName = "mediamtx.exe";
@Value("${mediamtx.enabled}")
Boolean mediamtxEnabled;
- //webrtc-streamer
- String webrtcName = "webrtc-streamer.exe";
- @Value("${webrtc.host}")
- String webrtcHost;
- @Value("${webrtc.enabled}")
- Boolean webrtcEnabled;
//redis
String redisName = "redis-server.exe";
@@ -124,25 +118,6 @@
// CmdUtils.commandStart(command);
}
}
- if (webrtcEnabled) {
- log.info("鍒濆鍖栧惎鍔╳ebrtc-streamer");
- if (Platform.isWindows()) {
- String exePath = System.getProperty("user.dir") + File.separator + "server" + File.separator + "webrtc" + File.separator + webrtcName;
- List<String> cmd = new ArrayList<>();
- cmd.add(exePath);
- cmd.add("-H" + webrtcHost);
- cmd.add("-o");
- if (CmdUtils.isProcessRunning(webrtcName)) {
- // 杩涚▼宸茬粡鍦ㄨ繍琛岋紝缁撴潫璇ヨ繘绋�
- CmdUtils.stopProcess(webrtcName);
- }
- // 鍚姩鍚庡彴杩涚▼
- CmdUtils.commandStart(webrtcName, cmd, null);
- // 鍚姩cmd绐楀彛
-// String[] command = {"cmd", "/c", "start", exePath, "-H127.0.0.1:8000", "-o"};
-// CmdUtils.commandStart(command);
- }
- }
}
@PreDestroy
@@ -159,13 +134,6 @@
if (CmdUtils.isProcessRunning(mediamtxName)) {
// 杩涚▼宸茬粡鍦ㄨ繍琛岋紝缁撴潫璇ヨ繘绋�
CmdUtils.stopProcess(mediamtxName);
- }
- }
- if (webrtcEnabled) {
- log.info("閿�姣亀ebrtc-streamer");
- if (CmdUtils.isProcessRunning(webrtcName)) {
- // 杩涚▼宸茬粡鍦ㄨ繍琛岋紝缁撴潫璇ヨ繘绋�
- CmdUtils.stopProcess(webrtcName);
}
}
if (true) {
diff --git a/pom.xml b/pom.xml
index f09ba96..9f8f074 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,6 +21,7 @@
<druid.version>1.2.15</druid.version>
<bitwalker.version>1.21</bitwalker.version>
<swagger.version>3.0.0</swagger.version>
+ <knife4j.version>3.0.3</knife4j.version>
<kaptcha.version>2.3.3</kaptcha.version>
<pagehelper.boot.version>1.4.6</pagehelper.boot.version>
<fastjson.version>2.0.20</fastjson.version>
@@ -77,20 +78,7 @@
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
- <version>2.0.9</version>
- </dependency>
-
- <!-- Swagger3渚濊禆 -->
- <dependency>
- <groupId>io.springfox</groupId>
- <artifactId>springfox-boot-starter</artifactId>
- <version>${swagger.version}</version>
- <exclusions>
- <exclusion>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-models</artifactId>
- </exclusion>
- </exclusions>
+ <version>${knife4j.version}</version>
</dependency>
<!-- io甯哥敤宸ュ叿绫� -->
diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml
index b12c35a..8c93b7b 100644
--- a/ruoyi-admin/pom.xml
+++ b/ruoyi-admin/pom.xml
@@ -30,7 +30,6 @@
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
- <version>3.0.3</version>
</dependency>
<!-- Postgresql椹卞姩鍖� -->
<dependency>
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java b/ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java
index 100f25b..3ebe714 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java
@@ -37,13 +37,13 @@
@Autowired
private ARDConfig ardConfig;
- /** 鏄惁寮�鍚痵wagger */
- @Value("${swagger.enabled}")
- private boolean enabled;
-
- /** 璁剧疆璇锋眰鐨勭粺涓�鍓嶇紑 */
- @Value("${swagger.pathMapping}")
- private String pathMapping;
+ ///** 鏄惁寮�鍚痵wagger */
+ //@Value("${swagger.enabled}")
+ //private boolean enabled;
+ //
+ ///** 璁剧疆璇锋眰鐨勭粺涓�鍓嶇紑 */
+ //@Value("${swagger.pathMapping}")
+ //private String pathMapping;
/**
* 鍒涘缓API
@@ -53,7 +53,7 @@
{
return new Docket(DocumentationType.SWAGGER_2)
// 鏄惁鍚敤Swagger
- .enable(enabled)
+ .enable(true)
// 鐢ㄦ潵鍒涘缓璇PI鐨勫熀鏈俊鎭紝灞曠ず鍦ㄦ枃妗g殑椤甸潰涓紙鑷畾涔夊睍绀虹殑淇℃伅锛�
.apiInfo(apiInfo())
// 璁剧疆鍝簺鎺ュ彛鏆撮湶缁橲wagger灞曠ず
@@ -68,7 +68,7 @@
/* 璁剧疆瀹夊叏妯″紡锛宻wagger鍙互璁剧疆璁块棶token */
.securitySchemes(securitySchemes())
.securityContexts(securityContexts())
- .pathMapping(pathMapping);
+ .pathMapping("/");
}
/**
diff --git a/ruoyi-admin/src/main/resources/application-dev.yml b/ruoyi-admin/src/main/resources/application-dev.yml
index 7f5dd11..0ea788b 100644
--- a/ruoyi-admin/src/main/resources/application-dev.yml
+++ b/ruoyi-admin/src/main/resources/application-dev.yml
@@ -1,104 +1,69 @@
-# 寮�鍙戠幆澧冮厤缃�
-server:
- # 鏈嶅姟鍣ㄧ殑HTTP绔彛锛岄粯璁や负8080
- port: 8080
- servlet:
- # 搴旂敤鐨勮闂矾寰�
- context-path: /
- tomcat:
- # tomcat鐨刄RI缂栫爜
- uri-encoding: UTF-8
- # 杩炴帴鏁版弧鍚庣殑鎺掗槦鏁帮紝榛樿涓�100
- accept-count: 1000
- threads:
- # tomcat鏈�澶х嚎绋嬫暟锛岄粯璁や负200
- max: 800
- # Tomcat鍚姩鍒濆鍖栫殑绾跨▼鏁帮紝榛樿鍊�10
- min-spare: 100
-# Spring閰嶇疆
-spring:
- # redis 閰嶇疆
- redis:
- # 鍦板潃
- host: 127.0.0.1
- # 绔彛锛岄粯璁や负6379
- port: 6379
- # 鏁版嵁搴撶储寮�
- database: 0
- # 瀵嗙爜
- password:
- # 杩炴帴瓒呮椂鏃堕棿
- timeout: 10s
- lettuce:
- pool:
- # 杩炴帴姹犱腑鐨勬渶灏忕┖闂茶繛鎺�
- min-idle: 0
- # 杩炴帴姹犱腑鐨勬渶澶х┖闂茶繛鎺�
- max-idle: 8
- # 杩炴帴姹犵殑鏈�澶ф暟鎹簱杩炴帴鏁�
- max-active: 8
- # #杩炴帴姹犳渶澶ч樆濉炵瓑寰呮椂闂达紙浣跨敤璐熷�艰〃绀烘病鏈夐檺鍒讹級
- max-wait: -1ms
-# 鏃ュ織閰嶇疆
-logging:
- level:
- authorize: info
- minio: info
- hikSdk: debug
- dhSdk: debug
- sdk: debug
- vtdu: debug
- stealAlarm: info
- websocket: info
- patrolInspectionTask: info
- mqtt: debug
- guideQueue: debug
- rongCloud: info
- cmd: info
- uav: info
- sy: info
-
-
-# webrtc-streamer閰嶇疆
-webrtc:
- enabled: false
- host: 127.0.0.1:8000
-# minio閰嶇疆
-minio:
- enabled: false
- endpoint: http://192.168.2.15:9001
- accessKey: admin
- secretKey: xzx12345
- path: G:/DATA
-# forest閰嶇疆
-forest:
- backend: okhttp3 # 鍚庣HTTP妗嗘灦锛堥粯璁や负 okhttp3锛�
- max-connections: 1000 # 杩炴帴姹犳渶澶ц繛鎺ユ暟锛堥粯璁や负 500锛�
- max-route-connections: 500 # 姣忎釜璺敱鐨勬渶澶ц繛鎺ユ暟锛堥粯璁や负 500锛�
- max-request-queue-size: 100 # [鑷獀1.5.22鐗堟湰璧峰彲鐢╙ 鏈�澶ц姹傜瓑寰呴槦鍒楀ぇ灏�
- max-async-thread-size: 300 # [鑷獀1.5.21鐗堟湰璧峰彲鐢╙ 鏈�澶у紓姝ョ嚎绋嬫暟
- max-async-queue-size: 16 # [鑷獀1.5.22鐗堟湰璧峰彲鐢╙ 鏈�澶у紓姝ョ嚎绋嬫睜闃熷垪澶у皬
- timeout: 3000 # [宸蹭笉鎺ㄨ崘浣跨敤] 璇锋眰瓒呮椂鏃堕棿锛屽崟浣嶄负姣锛堥粯璁や负 3000锛�
- connect-timeout: 3000 # 杩炴帴瓒呮椂鏃堕棿锛屽崟浣嶄负姣锛堥粯璁や负 timeout锛�
- read-timeout: 3000 # 鏁版嵁璇诲彇瓒呮椂鏃堕棿锛屽崟浣嶄负姣锛堥粯璁や负 timeout锛�
- max-retry-count: 0 # 璇锋眰澶辫触鍚庨噸璇曟鏁帮紙榛樿涓� 0 娆′笉閲嶈瘯锛�
- ssl-protocol: TLS # 鍗曞悜楠岃瘉鐨凥TTPS鐨勯粯璁LS鍗忚锛堥粯璁や负 TLS锛�
- log-enabled: true # 鎵撳紑鎴栧叧闂棩蹇楋紙榛樿涓� true锛�
- log-request: true # 鎵撳紑/鍏抽棴Forest璇锋眰鏃ュ織锛堥粯璁や负 true锛�
- log-response-status: true # 鎵撳紑/鍏抽棴Forest鍝嶅簲鐘舵�佹棩蹇楋紙榛樿涓� true锛�
- log-response-content: true # 鎵撳紑/鍏抽棴Forest鍝嶅簲鍐呭鏃ュ織锛堥粯璁や负 false锛�
- async-mode: platform # [鑷獀1.5.27鐗堟湰璧峰彲鐢╙ 寮傛妯″紡锛堥粯璁や负 platform锛�
-#娴佸獟浣撹浆鐮佹湇鍔″櫒
-mediamtx:
- enabled: true
- host: 192.168.1.227
-#mqtt
-mqtt:
- host: tcp://192.168.2.15:1883
- clientId: Server-2271
- username: admin
- password: admin
- topic: minioEvent,radar
- timeout: 100
- keepalive: 60
+# 寮�鍙戠幆澧冮厤缃�
+server:
+ # 鏈嶅姟鍣ㄧ殑HTTP绔彛锛岄粯璁や负8080
+ port: 8080
+ servlet:
+ # 搴旂敤鐨勮闂矾寰�
+ context-path: /
+ tomcat:
+ # tomcat鐨刄RI缂栫爜
+ uri-encoding: UTF-8
+ # 杩炴帴鏁版弧鍚庣殑鎺掗槦鏁帮紝榛樿涓�100
+ accept-count: 1000
+ threads:
+ # tomcat鏈�澶х嚎绋嬫暟锛岄粯璁や负200
+ max: 800
+ # Tomcat鍚姩鍒濆鍖栫殑绾跨▼鏁帮紝榛樿鍊�10
+ min-spare: 100
+# 鏃ュ織閰嶇疆
+logging:
+ level:
+ com.ruoyi.common.filter.MyI18nInterceptor: debug
+ authorize: info
+ minio: info
+ hikSdk: debug
+ dhSdk: debug
+ sdk: debug
+ vtdu: debug
+ stealAlarm: info
+ websocket: info
+ patrolInspectionTask: info
+ mqtt: info
+ guideQueue: debug
+ rongCloud: info
+ cmd: info
+ uav: info
+ sy: info
+## knife4j閰嶇疆
+knife4j:
+ # knife4j澧炲己鍔熻兘,寮�鍚悗涓嬮潰鍙傛暟鎵嶇敓鏁�
+ enable: true
+ #鏄惁涓虹敓浜фā寮� 椤圭洰閮ㄥ睘鏃朵负true 闃叉鎺ュ彛鏆撮湶
+ production: false
+ # 閰嶇疆鐢ㄦ埛瀵嗙爜
+ basic:
+ enable: false
+ username: admin
+ password: ardkj12345
+# minio閰嶇疆
+minio:
+ enabled: false
+ endpoint: http://192.168.2.15:9001
+ accessKey: admin
+ secretKey: xzx12345
+ path: G:/DATA
+#娴佸獟浣撹浆鐮佹湇鍔″櫒
+mediamtx:
+ enabled: true
+ host: 192.168.1.227
+#mqtt
+#鍏ㄩ儴涓婚锛歮inioEvent,radar,stealelec,tube,camera,external,accessControl,apponekey,digitization3
+mqtt:
+ host: tcp://192.168.2.15:1883
+ clientId: Server-227
+ username: admin
+ password: admin
+ topic: minioEvent,radar,stealelec,tube,camera,external,accessControl,apponekey,digitization3,radarForceGuide
+ timeout: 100
+ keepalive: 60
enabled: true
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/application-prod.yml b/ruoyi-admin/src/main/resources/application-prod.yml
index b11e3f0..6185a26 100644
--- a/ruoyi-admin/src/main/resources/application-prod.yml
+++ b/ruoyi-admin/src/main/resources/application-prod.yml
@@ -15,48 +15,17 @@
max: 800
# Tomcat鍚姩鍒濆鍖栫殑绾跨▼鏁帮紝榛樿鍊�10
min-spare: 100
-# Spring閰嶇疆
-spring:
- # redis 閰嶇疆
- redis:
- # 鍦板潃
- host: 192.168.5.229
- # 绔彛锛岄粯璁や负6379
- port: 6379
- # 鏁版嵁搴撶储寮�
- database: 0
- # 瀵嗙爜
- password:
- # 杩炴帴瓒呮椂鏃堕棿
- timeout: 10s
- lettuce:
- pool:
- # 杩炴帴姹犱腑鐨勬渶灏忕┖闂茶繛鎺�
- min-idle: 0
- # 杩炴帴姹犱腑鐨勬渶澶х┖闂茶繛鎺�
- max-idle: 8
- # 杩炴帴姹犵殑鏈�澶ф暟鎹簱杩炴帴鏁�
- max-active: 8
- # #杩炴帴姹犳渶澶ч樆濉炵瓑寰呮椂闂达紙浣跨敤璐熷�艰〃绀烘病鏈夐檺鍒讹級
- max-wait: -1ms
-# forest閰嶇疆
-forest:
- backend: okhttp3 # 鍚庣HTTP妗嗘灦锛堥粯璁や负 okhttp3锛�
- max-connections: 1000 # 杩炴帴姹犳渶澶ц繛鎺ユ暟锛堥粯璁や负 500锛�
- max-route-connections: 500 # 姣忎釜璺敱鐨勬渶澶ц繛鎺ユ暟锛堥粯璁や负 500锛�
- max-request-queue-size: 100 # [鑷獀1.5.22鐗堟湰璧峰彲鐢╙ 鏈�澶ц姹傜瓑寰呴槦鍒楀ぇ灏�
- max-async-thread-size: 300 # [鑷獀1.5.21鐗堟湰璧峰彲鐢╙ 鏈�澶у紓姝ョ嚎绋嬫暟
- max-async-queue-size: 16 # [鑷獀1.5.22鐗堟湰璧峰彲鐢╙ 鏈�澶у紓姝ョ嚎绋嬫睜闃熷垪澶у皬
- timeout: 3000 # [宸蹭笉鎺ㄨ崘浣跨敤] 璇锋眰瓒呮椂鏃堕棿锛屽崟浣嶄负姣锛堥粯璁や负 3000锛�
- connect-timeout: 3000 # 杩炴帴瓒呮椂鏃堕棿锛屽崟浣嶄负姣锛堥粯璁や负 timeout锛�
- read-timeout: 3000 # 鏁版嵁璇诲彇瓒呮椂鏃堕棿锛屽崟浣嶄负姣锛堥粯璁や负 timeout锛�
- max-retry-count: 0 # 璇锋眰澶辫触鍚庨噸璇曟鏁帮紙榛樿涓� 0 娆′笉閲嶈瘯锛�
- ssl-protocol: TLS # 鍗曞悜楠岃瘉鐨凥TTPS鐨勯粯璁LS鍗忚锛堥粯璁や负 TLS锛�
- log-enabled: true # 鎵撳紑鎴栧叧闂棩蹇楋紙榛樿涓� true锛�
- log-request: true # 鎵撳紑/鍏抽棴Forest璇锋眰鏃ュ織锛堥粯璁や负 true锛�
- log-response-status: true # 鎵撳紑/鍏抽棴Forest鍝嶅簲鐘舵�佹棩蹇楋紙榛樿涓� true锛�
- log-response-content: true # 鎵撳紑/鍏抽棴Forest鍝嶅簲鍐呭鏃ュ織锛堥粯璁や负 false锛�
- async-mode: platform # [鑷獀1.5.27鐗堟湰璧峰彲鐢╙ 寮傛妯″紡锛堥粯璁や负 platform锛�
+## knife4j閰嶇疆
+knife4j:
+ # knife4j澧炲己鍔熻兘,寮�鍚悗涓嬮潰鍙傛暟鎵嶇敓鏁�
+ enable: true
+ #鏄惁涓虹敓浜фā寮� 椤圭洰閮ㄥ睘鏃朵负true 闃叉鎺ュ彛鏆撮湶
+ production: true
+ # 閰嶇疆鐢ㄦ埛瀵嗙爜
+ basic:
+ enable: true
+ username: admin
+ password: ardkj12345
# 鏃ュ織閰嶇疆
logging:
level:
@@ -72,10 +41,6 @@
cmd: info
uav: info
sy: info
-# webrtc-streamer閰嶇疆
-webrtc:
- enabled: false
- host: 192.168.5.229:8000
# minio閰嶇疆
minio:
enabled: false
diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml
index 71c9ca2..772971f 100644
--- a/ruoyi-admin/src/main/resources/application.yml
+++ b/ruoyi-admin/src/main/resources/application.yml
@@ -30,13 +30,6 @@
# 浠ょ墝鏈夋晥鏈燂紙榛樿30鍒嗛挓锛�
expireTime: 30
# MyBatis閰嶇疆
-#mybatis:
-# # 鎼滅储鎸囧畾鍖呭埆鍚�
-# typeAliasesPackage: com.ruoyi.**.domain
-# # 閰嶇疆mapper鐨勬壂鎻忥紝鎵惧埌鎵�鏈夌殑mapper.xml鏄犲皠鏂囦欢
-# mapperLocations: classpath*:mapper/**/*Mapper.xml
-# # 鍔犺浇鍏ㄥ眬鐨勯厤缃枃浠�
-# configLocation: classpath:mybatis/mybatis-config.xml
mybatis-plus:
type-Aliases-Package: com.ruoyi.**.domain
mapper-Locations: classpath*:mapper/**/*Mapper.xml
@@ -45,34 +38,29 @@
banner: off # 鍏抽棴mybatisplus鍚姩鍥炬爣
db-config: #涓婚敭涓嶇敤MyBatis plus鐨勯洩鑺辩畻娉�,鐢ㄦ暟鎹簱鐨勪富閿嚜澧�
id-type: uuid
-# configuration:
-# # 鏄惁寮�鍚嚜鍔ㄩ┘宄板懡鍚嶈鍒欐槧灏�:浠庢暟鎹簱鍒楀悕鍒癑ava灞炴�ч┘宄板懡鍚嶇殑绫讳技鏄犲皠
-# map-underscore-to-camel-case: true
-# # 濡傛灉鏌ヨ缁撴灉涓寘鍚┖鍊肩殑鍒楋紝鍒� MyBatis 鍦ㄦ槧灏勭殑鏃跺�欙紝涓嶄細鏄犲皠杩欎釜瀛楁
-# call-setters-on-nulls: true
-# # 杩欎釜閰嶇疆浼氬皢鎵ц鐨剆ql鎵撳嵃鍑烘潵锛屽湪寮�鍙戞垨娴嬭瘯鐨勬椂鍊欏彲浠ョ敤
-# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# PageHelper鍒嗛〉鎻掍欢
pagehelper:
helperDialect: postgresql
supportMethodsArguments: true
params: count=countSql
-# Swagger閰嶇疆
-swagger:
- # 鏄惁寮�鍚痵wagger
- enabled: true
- # 璇锋眰鍓嶇紑
- pathMapping: /
-knife4j:
- # knife4j澧炲己鍔熻兘
- enable: true
- #鏄惁涓虹敓浜фā寮� 椤圭洰閮ㄥ睘鏃朵负true 闃叉鎺ュ彛鏆撮湶
- production: false
- # 閰嶇疆鐢ㄦ埛瀵嗙爜
- basic:
- enable: true
- username: admin
- password: ardkj12345
+# forest閰嶇疆
+forest:
+ backend: okhttp3 # 鍚庣HTTP妗嗘灦锛堥粯璁や负 okhttp3锛�
+ max-connections: 1000 # 杩炴帴姹犳渶澶ц繛鎺ユ暟锛堥粯璁や负 500锛�
+ max-route-connections: 500 # 姣忎釜璺敱鐨勬渶澶ц繛鎺ユ暟锛堥粯璁や负 500锛�
+ max-request-queue-size: 100 # [鑷獀1.5.22鐗堟湰璧峰彲鐢╙ 鏈�澶ц姹傜瓑寰呴槦鍒楀ぇ灏�
+ max-async-thread-size: 300 # [鑷獀1.5.21鐗堟湰璧峰彲鐢╙ 鏈�澶у紓姝ョ嚎绋嬫暟
+ max-async-queue-size: 16 # [鑷獀1.5.22鐗堟湰璧峰彲鐢╙ 鏈�澶у紓姝ョ嚎绋嬫睜闃熷垪澶у皬
+ timeout: 3000 # [宸蹭笉鎺ㄨ崘浣跨敤] 璇锋眰瓒呮椂鏃堕棿锛屽崟浣嶄负姣锛堥粯璁や负 3000锛�
+ connect-timeout: 3000 # 杩炴帴瓒呮椂鏃堕棿锛屽崟浣嶄负姣锛堥粯璁や负 timeout锛�
+ read-timeout: 3000 # 鏁版嵁璇诲彇瓒呮椂鏃堕棿锛屽崟浣嶄负姣锛堥粯璁や负 timeout锛�
+ max-retry-count: 0 # 璇锋眰澶辫触鍚庨噸璇曟鏁帮紙榛樿涓� 0 娆′笉閲嶈瘯锛�
+ ssl-protocol: TLS # 鍗曞悜楠岃瘉鐨凥TTPS鐨勯粯璁LS鍗忚锛堥粯璁や负 TLS锛�
+ log-enabled: true # 鎵撳紑鎴栧叧闂棩蹇楋紙榛樿涓� true锛�
+ log-request: true # 鎵撳紑/鍏抽棴Forest璇锋眰鏃ュ織锛堥粯璁や负 true锛�
+ log-response-status: true # 鎵撳紑/鍏抽棴Forest鍝嶅簲鐘舵�佹棩蹇楋紙榛樿涓� true锛�
+ log-response-content: true # 鎵撳紑/鍏抽棴Forest鍝嶅簲鍐呭鏃ュ織锛堥粯璁や负 false锛�
+ async-mode: platform # [鑷獀1.5.27鐗堟湰璧峰彲鐢╙ 寮傛妯″紡锛堥粯璁や负 platform锛�
# 闃叉XSS鏀诲嚮
xss:
# 杩囨护寮�鍏�
@@ -107,6 +95,29 @@
enabled: false
thymeleaf:
cache: false
+ # redis 閰嶇疆
+ redis:
+ # 鍦板潃
+ host: 127.0.0.1
+ # 绔彛锛岄粯璁や负6379
+ port: 6379
+ # 鏁版嵁搴撶储寮�
+ database: 0
+ # 瀵嗙爜
+ password:
+ # 杩炴帴瓒呮椂鏃堕棿
+ timeout: 10s
+ lettuce:
+ pool:
+ # 杩炴帴姹犱腑鐨勬渶灏忕┖闂茶繛鎺�
+ min-idle: 0
+ # 杩炴帴姹犱腑鐨勬渶澶х┖闂茶繛鎺�
+ max-idle: 8
+ # 杩炴帴姹犵殑鏈�澶ф暟鎹簱杩炴帴鏁�
+ max-active: 8
+ # #杩炴帴姹犳渶澶ч樆濉炵瓑寰呮椂闂达紙浣跨敤璐熷�艰〃绀烘病鏈夐檺鍒讹級
+ max-wait: -1ms
+ # 婵�娲婚厤缃枃浠�
profiles:
active: dev-druid,dev
diff --git a/ruoyi-admin/src/main/resources/mybatis/mybatis-config.xml b/ruoyi-admin/src/main/resources/mybatis/mybatis-config.xml
index 7f4291b..4aaccf2 100644
--- a/ruoyi-admin/src/main/resources/mybatis/mybatis-config.xml
+++ b/ruoyi-admin/src/main/resources/mybatis/mybatis-config.xml
@@ -1,21 +1,21 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration
-PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-config.dtd">
+ PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
+ "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<!-- 鍏ㄥ眬鍙傛暟 -->
<settings>
<!-- 浣垮叏灞�鐨勬槧灏勫櫒鍚敤鎴栫鐢ㄧ紦瀛� -->
- <setting name="cacheEnabled" value="true" />
+ <setting name="cacheEnabled" value="true"/>
<!-- 鍏佽JDBC 鏀寔鑷姩鐢熸垚涓婚敭 -->
- <setting name="useGeneratedKeys" value="true" />
+ <setting name="useGeneratedKeys" value="true"/>
<!-- 閰嶇疆榛樿鐨勬墽琛屽櫒.SIMPLE灏辨槸鏅�氭墽琛屽櫒;REUSE鎵ц鍣ㄤ細閲嶇敤棰勫鐞嗚鍙�(prepared statements);BATCH鎵ц鍣ㄥ皢閲嶇敤璇彞骞舵墽琛屾壒閲忔洿鏂� -->
- <setting name="defaultExecutorType" value="SIMPLE" />
- <!-- 鎸囧畾 MyBatis 鎵�鐢ㄦ棩蹇楃殑鍏蜂綋瀹炵幇 -->
- <setting name="logImpl" value="SLF4J" />
+ <setting name="defaultExecutorType" value="SIMPLE"/>
+ <!-- 鎸囧畾 MyBatis 鎵�鐢ㄦ棩蹇楃殑鍏蜂綋瀹炵幇 -->
+ <setting name="logImpl" value="SLF4J"/>
<!-- 浣跨敤椹煎嘲鍛藉悕娉曡浆鎹㈠瓧娈� -->
- <!-- <setting name="mapUnderscoreToCamelCase" value="true"/> -->
- </settings>
+ <!-- <setting name="mapUnderscoreToCamelCase" value="true"/> -->
+ </settings>
<typeAliases>
<package name="com.ruoyi.*.*.domain"/> <!--鏇挎崲鎴愪綘鐨勯」鐩殑瀹炰綋绫荤殑璺緞(杩欎釜閰嶇疆瀵逛簬椤圭洰鏉ヨ娌℃湁浣滅敤锛屼粎浠呮槸鍐欑粰IDEA涓婂畨瑁呯殑 MyBatis 鎻掍欢鐪嬬殑锛岄槻姝㈡爣绾�)-->
<package name="com.ruoyi.*.domain"/>
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/filter/MyI18nInterceptor.java b/ruoyi-common/src/main/java/com/ruoyi/common/filter/MyI18nInterceptor.java
index f134600..b1f6b52 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/filter/MyI18nInterceptor.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/filter/MyI18nInterceptor.java
@@ -7,6 +7,7 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import java.util.Enumeration;
import java.util.Locale;
@Slf4j
@@ -18,13 +19,14 @@
final String key = "language";
//String language = "en-US";
//String language = "zh-CN";
+ Enumeration<String> headers = request.getHeaderNames();
String language = request.getHeader(key);
if (language == null) {
//String language = "en-US";
language = "en-US";
}
- // 鍓嶇浼犻�掔殑language蹇呴』鏄痾h-CN鏍煎紡鐨勶紝涓棿鐨刜蹇呴』瑕佸畬鏁达紝涓嶈兘鍙紶閫抸h鎴杄n
- log.info("褰撳墠璇█={}", language);
+ // 鍓嶇浼犻�掔殑language蹇呴』鏄痾h-CN鏍煎紡鐨勶紝涓棿鐨�-蹇呴』瑕佸畬鏁达紝涓嶈兘鍙紶閫抸h鎴杄n
+ log.debug("褰撳墠璇█={}", language);
Locale locale = new Locale(language.split("-")[0], language.split("-")[1]);
// 杩欐牱璧嬪�间互鍚庯紝MessageUtils.message鏂规硶灏变笉鐢ㄤ慨鏀逛簡
LocaleContextHolder.setLocale(locale);
--
Gitblit v1.9.3