chore: 优化部分代码格式

This commit is contained in:
2025-12-28 21:11:15 +08:00
parent 776acc6e5c
commit 485b473292
7 changed files with 24 additions and 24 deletions

View File

@@ -29,8 +29,8 @@ import java.io.IOException;
/**
* 通用配置文件读取工厂
* <p>
* DefaultPropertySourceFactory 仅支持 properties
* 配置文件读取,详见:<a
* DefaultPropertySourceFactory 仅支持 properties 配置文件读取 <br>
* 详见:<a
* href="https://docs.spring.io/spring-boot/docs/2.0.6.RELEASE/reference/html/boot-features-external-config.html#boot-features-external-config-yaml-shortcomings">YAMLShortcomings</a>
* </p>
*

View File

@@ -48,11 +48,11 @@ import java.util.Map;
*/
public class SpringWebUtils {
private static final AntPathMatcher MATCHER = new AntPathMatcher();
private SpringWebUtils() {
}
private static final AntPathMatcher MATCHER = new AntPathMatcher();
/**
* 路径是否匹配
*
@@ -97,7 +97,8 @@ public class SpringWebUtils {
* @param path 路径
* @param pattern 匹配模式
* @return 是否匹配
* @since 2.4.0
* @author echo
* @since 2.15.0
*/
public static boolean isMatchAnt(String path, String pattern) {
return MATCHER.match(pattern, path);
@@ -109,7 +110,8 @@ public class SpringWebUtils {
* @param path 路径
* @param patterns 匹配模式列表
* @return 是否匹配
* @since 2.6.0
* @author echo
* @since 2.15.0
*/
public static boolean isMatchAnt(String path, List<String> patterns) {
return patterns.stream().anyMatch(pattern -> isMatchAnt(path, pattern));