From e2de22bdce173a951083a81d0065c69d8e5e9832 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期二, 28 九月 2021 18:26:08 +0800
Subject: [PATCH] update 优化 代码生成常量 关于 BO VO 注释
---
ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java | 27 ++++++---------------------
1 files changed, 6 insertions(+), 21 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 3b19e57..dc7821e 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
@@ -6,6 +6,8 @@
import cn.dev33.satoken.stp.StpUtil;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.framework.config.properties.SecurityProperties;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.cors.CorsConfiguration;
@@ -17,7 +19,6 @@
import java.util.Arrays;
import java.util.Collections;
-import java.util.List;
/**
* 閫氱敤閰嶇疆
@@ -27,28 +28,12 @@
@Configuration
public class ResourcesConfig implements WebMvcConfigurer {
+ @Autowired
+ private SecurityProperties securityProperties;
+
// 娉ㄥ唽sa-token鐨勬嫤鎴櫒
@Override
public void addInterceptors(InterceptorRegistry registry) {
- List<String> urlPath = Arrays.asList(
- "/login",
- "/logout",
- "/captchaImage",
- "/*.html",
- "/**/*.html",
- "/**/*.css",
- "/**/*.js",
- "/profile/**",
- "/common/download**",
- "/common/download/resource**",
- "/swagger-ui.html",
- "/swagger-resources/**",
- "/webjars/**",
- "/*/api-docs",
- "/druid/**",
- "/actuator",
- "/actuator/**"
- );
// 娉ㄥ唽璺敱鎷︽埅鍣紝鑷畾涔夐獙璇佽鍒�
registry.addInterceptor(new SaRouteInterceptor((request, response, handler) -> {
// 鐧诲綍楠岃瘉 -- 鎺掗櫎澶氫釜璺緞
@@ -56,7 +41,7 @@
//鑾峰彇鎵�鏈夌殑
Collections.singletonList("/**"),
//鎺掗櫎涓嬩笉闇�瑕佹嫤鎴殑
- urlPath,
+ Arrays.asList(securityProperties.getExcludes()),
() -> {
Long userId = SecurityUtils.getUserId();
if(StringUtils.isNotNull(userId) ) {
--
Gitblit v1.9.3