From 15f7d4dc471a735ead8000fc0809cd46c390f055 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期四, 22 十二月 2022 18:26:18 +0800
Subject: [PATCH] update 优化 springdoc 配置鉴权头写死问题 增加持久化鉴权头配置

---
 ruoyi-admin/src/main/resources/application.yml |   59 ++++++++++++++++++++---------------------------------------
 1 files changed, 20 insertions(+), 39 deletions(-)

diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml
index 3c11d01..d625156 100644
--- a/ruoyi-admin/src/main/resources/application.yml
+++ b/ruoyi-admin/src/main/resources/application.yml
@@ -53,6 +53,14 @@
     org.springframework: warn
   config: classpath:logback.xml
 
+# 鐢ㄦ埛閰嶇疆
+user:
+  password:
+    # 瀵嗙爜鏈�澶ч敊璇鏁�
+    maxRetryCount: 5
+    # 瀵嗙爜閿佸畾鏃堕棿锛堥粯璁�10鍒嗛挓锛�
+    lockTime: 10
+
 # Spring閰嶇疆
 spring:
   application:
@@ -75,10 +83,6 @@
     restart:
       # 鐑儴缃插紑鍏�
       enabled: true
-  mvc:
-    pathmatch:
-      # 閫傞厤 boot 2.6 璺敱涓� springfox 鍏煎
-      matching-strategy: ANT_PATH_MATCHER
   jackson:
     # 鏃ユ湡鏍煎紡鍖�
     date-format: yyyy-MM-dd HH:mm:ss
@@ -104,15 +108,13 @@
   # 鍦ㄥ浜虹櫥褰曞悓涓�璐﹀彿鏃讹紝鏄惁鍏辩敤涓�涓猼oken (涓簍rue鏃舵墍鏈夌櫥褰曞叡鐢ㄤ竴涓猼oken, 涓篺alse鏃舵瘡娆$櫥褰曟柊寤轰竴涓猼oken)
   is-share: false
   # 鏄惁灏濊瘯浠巋eader閲岃鍙杢oken
-  is-read-head: true
+  is-read-header: true
   # 鏄惁灏濊瘯浠巆ookie閲岃鍙杢oken
   is-read-cookie: false
   # token鍓嶇紑
   token-prefix: "Bearer"
   # jwt绉橀挜
   jwt-secret-key: abcdefghijklmnopqrstuvwxyz
-  # 鏄惁杈撳嚭鎿嶄綔鏃ュ織
-  is-log: true
 
 # security閰嶇疆
 security:
@@ -125,11 +127,12 @@
     - /**/*.js
     # swagger 鏂囨。閰嶇疆
     - /favicon.ico
-    - /doc.html
-    - /swagger-ui/**
+    - /*/api-docs
     - /*/api-docs/**
-    # druid 鐩戞帶閰嶇疆
-    - /druid/**
+    - /swagger-ui/**
+    - /webjars/**
+    - /swagger-ui.html
+    - /doc.html
     # actuator 鐩戞帶閰嶇疆
     - /actuator
     - /actuator/**
@@ -204,15 +207,8 @@
 
 springdoc:
   swagger-ui:
-    # 淇敼Swagger UI璺緞
-    path: /doc.html
-    # 寮�鍚疭wagger UI鐣岄潰
-    enabled: true
-  api-docs:
-    # 淇敼api-docs璺緞
-    path: /v3/api-docs
-    # 寮�鍚痑pi-docs
-    enabled: true
+    # 鎸佷箙鍖栬璇佹暟鎹�
+    persistAuthorization: true
   #杩欓噷瀹氫箟浜嗕袱涓垎缁勶紝鍙畾涔夊涓紝涔熷彲浠ヤ笉瀹氫箟
   group-configs:
     - group: 1.婕旂ず妯″潡
@@ -240,26 +236,11 @@
   # 绾跨▼姹犵淮鎶ょ嚎绋嬫墍鍏佽鐨勭┖闂叉椂闂�
   keepAliveSeconds: 300
 
---- # redisson 缂撳瓨閰嶇疆
-redisson:
-  cacheGroup:
-    # 鐢ㄤ緥: @Cacheable(cacheNames="groupId", key="#XXX") 鏂瑰彲浣跨敤缂撳瓨缁勯厤缃�
-    - groupId: redissonCacheMap
-      # 缁勮繃鏈熸椂闂�(鑴氭湰鐩戞帶)
-      ttl: 60000
-      # 缁勬渶澶х┖闂叉椂闂�(鑴氭湰鐩戞帶)
-      maxIdleTime: 60000
-      # 缁勬渶澶ч暱搴�
-      maxSize: 0
-    - groupId: testCache
-      ttl: 1000
-      maxIdleTime: 500
-
 --- # 鍒嗗竷寮忛攣 lock4j 鍏ㄥ眬閰嶇疆
 lock4j:
   # 鑾峰彇鍒嗗竷寮忛攣瓒呮椂鏃堕棿锛岄粯璁や负 3000 姣
   acquire-timeout: 3000
-  # 鍒嗗竷寮忛攣鐨勮秴鏃舵椂闂达紝榛樿涓� 30 姣
+  # 鍒嗗竷寮忛攣鐨勮秴鏃舵椂闂达紝榛樿涓� 30 绉�
   expire: 30000
 
 --- # Actuator 鐩戞帶绔偣鐨勯厤缃」
@@ -267,9 +248,9 @@
   endpoints:
     web:
       exposure:
-        # 闇�瑕佸紑鏀剧殑绔偣銆傞粯璁ゅ�煎彧鎵撳紑 health 鍜� info 涓や釜绔偣銆傞�氳繃璁剧疆 * 锛屽彲浠ュ紑鏀炬墍鏈夌鐐广��
-        # 鐢熶骇鐜涓嶅缓璁斁寮�鎵�鏈� 鏍规嵁椤圭洰闇�姹傛斁寮�鍗冲彲
-        include: @endpoints.include@
+        include: '*'
   endpoint:
+    health:
+      show-details: ALWAYS
     logfile:
       external-file: ./logs/sys-console.log

--
Gitblit v1.9.3