Class MvcRequestMatcher.Builder
- java.lang.Object
-
- org.springframework.security.web.servlet.util.matcher.MvcRequestMatcher.Builder
-
- Enclosing class:
- MvcRequestMatcher
public static final class MvcRequestMatcher.Builder extends java.lang.Object
A builder forMvcRequestMatcher
- Since:
- 5.8
-
-
Constructor Summary
Constructors Constructor Description Builder(org.springframework.web.servlet.handler.HandlerMappingIntrospector introspector)
Construct a new instance of this builder
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MvcRequestMatcher
pattern(java.lang.String pattern)
Creates anMvcRequestMatcher
that uses the provided pattern to matchMvcRequestMatcher
pattern(org.springframework.http.HttpMethod method, java.lang.String pattern)
Creates anMvcRequestMatcher
that uses the provided pattern and HTTP method to matchMvcRequestMatcher.Builder
servletPath(java.lang.String servletPath)
Sets the servlet path to be used by theMvcRequestMatcher
generated by this builder
-
-
-
Method Detail
-
servletPath
public MvcRequestMatcher.Builder servletPath(java.lang.String servletPath)
Sets the servlet path to be used by theMvcRequestMatcher
generated by this builder- Parameters:
servletPath
- the servlet path to use- Returns:
- the
MvcRequestMatcher.Builder
for further configuration
-
pattern
public MvcRequestMatcher pattern(java.lang.String pattern)
Creates anMvcRequestMatcher
that uses the provided pattern to match- Parameters:
pattern
- the pattern used to match- Returns:
- the generated
MvcRequestMatcher
-
pattern
public MvcRequestMatcher pattern(org.springframework.http.HttpMethod method, java.lang.String pattern)
Creates anMvcRequestMatcher
that uses the provided pattern and HTTP method to match- Parameters:
method
- theHttpMethod
, can be nullpattern
- the patterns used to match- Returns:
- the generated
MvcRequestMatcher
-
-