Package com.alibaba.druid.util
Class ServletPathMatcher
- java.lang.Object
-
- com.alibaba.druid.util.ServletPathMatcher
-
- All Implemented Interfaces:
PatternMatcher
public class ServletPathMatcher extends Object implements PatternMatcher
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ServletPathMatchergetInstance()booleanmatches(String pattern, String source)three type: endsWithMatch(eg.
-
-
-
Method Detail
-
getInstance
public static ServletPathMatcher getInstance()
-
matches
public boolean matches(String pattern, String source)
three type: endsWithMatch(eg. /xxx*=/xxx/xyz), startsWithMatch(eg. *.xxx=abc.xxx), equals(eg. /xxx=/xxx).
Notice: *xxx* will match *xxxyyyy. endsWithMatch first.- Specified by:
matchesin interfacePatternMatcher- Parameters:
pattern- the pattern to match againstsource- the source to match- Returns:
trueif the givensourcematches the specifiedpattern,falseotherwise.
-
-