mirror of
https://github.com/continew-org/continew-starter.git
synced 2026-01-10 00:57:16 +08:00
chore: 优化部分代码格式
This commit is contained in:
@@ -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>
|
||||
*
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user