com.zusmart.basic.matcher.PathMatcher Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zusmart-basic Show documentation
Show all versions of zusmart-basic Show documentation
基础模块,提供配置,日志,SPI,图排序,路径匹配,资源扫描,包扫描,常用工具类
package com.zusmart.basic.matcher;
import java.util.Comparator;
import java.util.Map;
import com.zusmart.basic.extension.Extension;
import com.zusmart.basic.extension.ExtensionScope;
/**
* 路径匹配工具类,可自定义扩展
*
* @author Administrator
*
*/
@Extension(value = "internal", scope = ExtensionScope.Singleton)
public interface PathMatcher {
public static final String KEY = "zusmart.extension.path_matcher";// PathMatcher扩展点
public static final String VAL = "internal";
public boolean isPattern(String path);
public boolean match(String pattern, String path);
public boolean matchStart(String pattern, String path);
public String extractPathWithinPattern(String pattern, String path);
public Map extractUriTemplateVariables(String pattern, String path);
public Comparator getPatternComparator(String path);
public String combine(String pattern1, String pattern2);
}