java.lang.Object
com.broadleafcommerce.resource.security.utils.MatcherUtil

public final class MatcherUtil extends Object
Utility for creating new MvcRequestMatcher instances.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 pattern
      http - 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 pattern
      http - The security context being modified
      servletPath - The servlet path for the servlet to which the matcher should be associated.
      Returns:
      A new MvcRequestMatcher instance