chore: 修改工具类名称

This commit is contained in:
CaptainB 2023-02-03 21:15:26 +08:00
parent 7901950a0d
commit 99b4713134
3 changed files with 6 additions and 6 deletions

View File

@ -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));

View File

@ -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<String, String> 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;

View File

@ -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<String, String> loadBaseFilterChain() {
Map<String, String> filterChainDefinitionMap = new HashMap<>();