|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.security.web.util.AntPathRequestMatcher
public final class AntPathRequestMatcher
Matcher which compares a pre-defined ant-style pattern against the URL
(servletPath + pathInfo) of an HttpServletRequest.
The query string of the URL is ignored and matching is case-insensitive.
Using a pattern value of /** or ** is treated as a universal
match, which will match any request. Patterns which end with /** (and have no other wildcards)
are optimized by using a substring match — a pattern of /aaa/** will match /aaa,
/aaa/ and any sub-directories, such as /aaa/bbb/ccc.
For all other cases, Spring's AntPathMatcher is used to perform the match. See the Spring documentation
for this class for comprehensive information on the syntax used.
AntPathMatcher| Constructor Summary | |
|---|---|
AntPathRequestMatcher(String pattern)
Creates a matcher with the specific pattern which will match all HTTP methods. |
|
AntPathRequestMatcher(String pattern,
String httpMethod)
Creates a matcher with the supplied pattern which will match all HTTP methods. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
String |
getPattern()
|
int |
hashCode()
|
boolean |
matches(javax.servlet.http.HttpServletRequest request)
Returns true if the configured pattern (and HTTP-Method) match those of the supplied request. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AntPathRequestMatcher(String pattern)
pattern - the ant pattern to use for matching
public AntPathRequestMatcher(String pattern,
String httpMethod)
pattern - the ant pattern to use for matchinghttpMethod - the HTTP method. The matches method will return false if the incoming request doesn't
have the same method.| Method Detail |
|---|
public boolean matches(javax.servlet.http.HttpServletRequest request)
matches in interface RequestMatcherrequest - the request to match against. The ant pattern will be matched against the
servletPath + pathInfo of the request.
public String getPattern()
public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||