mirror of
https://github.com/continew-org/continew-starter.git
synced 2026-01-16 06:57:14 +08:00
refactor(core): 合并 SpringWebUtils 到 SpringUtils
This commit is contained in:
@@ -19,8 +19,8 @@ package top.continew.starter.log.model;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.context.properties.NestedConfigurationProperty;
|
||||
import top.continew.starter.core.constant.PropertiesConstants;
|
||||
import top.continew.starter.core.util.SpringUtils;
|
||||
import top.continew.starter.log.enums.Include;
|
||||
import top.continew.starter.core.util.SpringWebUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -95,6 +95,6 @@ public class LogProperties {
|
||||
* @return true: 匹配; false: 不匹配
|
||||
*/
|
||||
public boolean isMatchExcludeUri(String uri) {
|
||||
return this.getExcludePatterns().stream().anyMatch(pattern -> SpringWebUtils.isMatch(uri, pattern));
|
||||
return this.getExcludePatterns().stream().anyMatch(pattern -> SpringUtils.isMatch(uri, pattern));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ package top.continew.starter.log.util;
|
||||
|
||||
import cn.hutool.core.text.CharSequenceUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import top.continew.starter.core.util.SpringWebUtils;
|
||||
import top.continew.starter.core.util.SpringUtils;
|
||||
import top.continew.starter.log.http.RecordableHttpRequest;
|
||||
import top.continew.starter.log.model.AccessLogProperties;
|
||||
import top.continew.starter.log.model.LogProperties;
|
||||
@@ -97,7 +97,7 @@ public class AccessLogUtils {
|
||||
public static boolean exclusionPath(LogProperties properties, String path) {
|
||||
// 放行路由配置的排除检查
|
||||
return properties.isMatchExcludeUri(path) || RESOURCE_PATH.stream()
|
||||
.anyMatch(resourcePath -> SpringWebUtils.isMatchAnt(path, resourcePath));
|
||||
.anyMatch(resourcePath -> SpringUtils.isMatchAnt(path, resourcePath));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user