diff --git a/framework/gateway/src/main/java/io/metersphere/gateway/filter/LoginFilter.java b/framework/gateway/src/main/java/io/metersphere/gateway/filter/LoginFilter.java index 9a98b79244..b2eb38a76e 100644 --- a/framework/gateway/src/main/java/io/metersphere/gateway/filter/LoginFilter.java +++ b/framework/gateway/src/main/java/io/metersphere/gateway/filter/LoginFilter.java @@ -1,6 +1,6 @@ package io.metersphere.gateway.filter; -import io.metersphere.commons.utils.ShiroUtils; +import io.metersphere.commons.utils.FilterChainUtils; import jakarta.annotation.PostConstruct; import jakarta.annotation.Resource; import org.springdoc.core.properties.SwaggerUiConfigProperties; @@ -38,7 +38,7 @@ public class LoginFilter implements WebFilter, Ordered { // 各模块首页 swaggerUiConfigProperties.getUrls().forEach(v -> excludePatterns.add(new PathPatternParser().parse("/" + v.getName()))); - ShiroUtils.loadBaseFilterChain() + FilterChainUtils.loadBaseFilterChain() .forEach((url, v) -> { excludePatterns.add(new PathPatternParser().parse(url)); excludePatterns.add(new PathPatternParser().parse("/*" + url)); diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/ShiroConfig.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/ShiroConfig.java index c663613af4..8cc67756ed 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/ShiroConfig.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/autoconfigure/ShiroConfig.java @@ -1,7 +1,7 @@ package io.metersphere.autoconfigure; -import io.metersphere.commons.utils.ShiroUtils; +import io.metersphere.commons.utils.FilterChainUtils; import io.metersphere.security.ApiKeyFilter; import io.metersphere.security.CsrfFilter; import io.metersphere.security.MsPermissionAnnotationMethodInterceptor; @@ -43,9 +43,9 @@ public class ShiroConfig { shiroFilterFactoryBean.getFilters().put("csrf", new CsrfFilter()); Map filterChainDefinitionMap = shiroFilterFactoryBean.getFilterChainDefinitionMap(); - filterChainDefinitionMap.putAll(ShiroUtils.loadBaseFilterChain()); + filterChainDefinitionMap.putAll(FilterChainUtils.loadBaseFilterChain()); - filterChainDefinitionMap.putAll(ShiroUtils.ignoreCsrfFilter()); + filterChainDefinitionMap.putAll(FilterChainUtils.ignoreCsrfFilter()); filterChainDefinitionMap.put("/**", "apikey, csrf, authc"); return shiroFilterFactoryBean; diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/commons/utils/ShiroUtils.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/commons/utils/FilterChainUtils.java similarity index 99% rename from framework/sdk-parent/sdk/src/main/java/io/metersphere/commons/utils/ShiroUtils.java rename to framework/sdk-parent/sdk/src/main/java/io/metersphere/commons/utils/FilterChainUtils.java index 9ecb4117a2..c2e8fd58a2 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/commons/utils/ShiroUtils.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/commons/utils/FilterChainUtils.java @@ -3,7 +3,7 @@ package io.metersphere.commons.utils; import java.util.HashMap; import java.util.Map; -public class ShiroUtils { +public class FilterChainUtils { public static Map loadBaseFilterChain() { Map filterChainDefinitionMap = new HashMap<>();