Class MatcherUtil
java.lang.Object
com.broadleafcommerce.resource.security.utils.MatcherUtil
Utility for creating new MvcRequestMatcher instances.
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.springframework.security.web.servlet.util.matcher.MvcRequestMatcher
mvcMatcher
(String pattern, org.springframework.security.config.annotation.web.builders.HttpSecurity http) Create a new MvcRequestMatcher instance.static org.springframework.security.web.servlet.util.matcher.MvcRequestMatcher
mvcMatcher
(String pattern, org.springframework.security.config.annotation.web.builders.HttpSecurity http, String servletPath) Create a new MvcRequestMatcher instance.
-
Method Details
-
mvcMatcher
public static org.springframework.security.web.servlet.util.matcher.MvcRequestMatcher mvcMatcher(String pattern, org.springframework.security.config.annotation.web.builders.HttpSecurity http) Create a new MvcRequestMatcher instance. Defaults to a null servlet path.- Parameters:
pattern
- The mvc matching patternhttp
- The security context being modified- Returns:
- A new MvcRequestMatcher instance
-
mvcMatcher
public static org.springframework.security.web.servlet.util.matcher.MvcRequestMatcher mvcMatcher(String pattern, org.springframework.security.config.annotation.web.builders.HttpSecurity http, String servletPath) Create a new MvcRequestMatcher instance. This method is most interesting if more than one mappable servlet is registered in the servlet context, and you need to explicitly associate the pattern with a particular servlet based on the servlet path. In general, targeting this method with a servletPath of""
is desired in order to target the default servlet context.- Parameters:
pattern
- The mvc matching patternhttp
- The security context being modifiedservletPath
- The servlet path for the servlet to which the matcher should be associated.- Returns:
- A new MvcRequestMatcher instance
-