public class ServletPathMatcher extends Object implements PatternMatcher
public static ServletPathMatcher getInstance()
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.matches
在接口中 PatternMatcher
pattern
- the pattern to match againstsource
- the source to matchtrue
if the given source
matches the specified pattern
,
false
otherwise.Copyright © 2012-2013 Alibaba Group. All Rights Reserved.