public final class MvcRequestMatcher extends Object implements RequestMatcher, RequestVariablesExtractor
RequestMatcher that uses Spring MVC's HandlerMappingIntrospector to
match the path and extract variables.| Constructor and Description |
|---|
MvcRequestMatcher(HandlerMappingIntrospector introspector,
String pattern) |
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> |
extractUriTemplateVariables(javax.servlet.http.HttpServletRequest request)
Extract URL template variables from the request.
|
boolean |
matches(javax.servlet.http.HttpServletRequest request)
Decides whether the rule implemented by the strategy matches the supplied request.
|
void |
setMethod(HttpMethod method) |
public MvcRequestMatcher(HandlerMappingIntrospector introspector, String pattern)
public boolean matches(javax.servlet.http.HttpServletRequest request)
RequestMatchermatches in interface RequestMatcherrequest - the request to check for a matchpublic Map<String,String> extractUriTemplateVariables(javax.servlet.http.HttpServletRequest request)
RequestVariablesExtractorextractUriTemplateVariables in interface RequestVariablesExtractorrequest - the HttpServletRequest to obtain a URL to extract the variables frompublic void setMethod(HttpMethod method)
method - the method to set