From 2670e932c49d6541ff796107d8ab13a732fcde0d Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期六, 22 二月 2025 10:17:52 +0800
Subject: [PATCH] 资源要求-8.文件发放与回收修改

---
 ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

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 3900552..7b0300c 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
@@ -17,7 +17,7 @@
 
 /**
  * 閫氱敤閰嶇疆
- * 
+ *
  * @author ruoyi
  */
 @Configuration
@@ -32,11 +32,15 @@
         /** 鏈湴鏂囦欢涓婁紶璺緞 */
         registry.addResourceHandler(Constants.RESOURCE_PREFIX + "/**")
                 .addResourceLocations("file:" + RuoYiConfig.getProfile() + "/");
+//
+//        /** swagger閰嶇疆 */
+//        registry.addResourceHandler("/swagger-ui/**")
+//                .addResourceLocations("classpath:/META-INF/resources/webjars/springfox-swagger-ui/")
+//                .setCacheControl(CacheControl.maxAge(5, TimeUnit.HOURS).cachePublic());
 
-        /** swagger閰嶇疆 */
-        registry.addResourceHandler("/swagger-ui/**")
-                .addResourceLocations("classpath:/META-INF/resources/webjars/springfox-swagger-ui/")
-                .setCacheControl(CacheControl.maxAge(5, TimeUnit.HOURS).cachePublic());
+        registry.addResourceHandler("/doc.html").addResourceLocations("classpath:/META-INF/resources/");
+        registry.addResourceHandler("/favicon.ico").addResourceLocations("classpath:/META-INF/resources/");
+        registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
     }
 
     /**
@@ -70,4 +74,4 @@
         // 杩斿洖鏂扮殑CorsFilter
         return new CorsFilter(source);
     }
-}
\ No newline at end of file
+}

--
Gitblit v1.9.3