refactor(core): 合并 SpringWebUtils 到 SpringUtils

This commit is contained in:
2025-12-30 22:52:41 +08:00
parent 8ce00d8892
commit 25fb9e0a27
8 changed files with 182 additions and 210 deletions

View File

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

View File

@@ -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));
}
/**