Class HttpSecurity.RequestMatcherConfigurer

    • Field Detail

      • matchers

        protected java.util.List<org.springframework.security.web.util.matcher.RequestMatcher> matchers
    • Method Detail

      • mvcMatchers

        public HttpSecurity.MvcMatchersRequestMatcherConfigurer mvcMatchers​(org.springframework.http.HttpMethod method,
                                                                            java.lang.String... mvcPatterns)
        Description copied from class: AbstractRequestMatcherRegistry

        Maps an MvcRequestMatcher that also specifies a specific HttpMethod to match on. This matcher will use the same rules that Spring MVC uses for matching. For example, often times a mapping of the path "/path" will match on "/path", "/path/", "/path.html", etc.

        If the current request will not be processed by Spring MVC, a reasonable default using the pattern as a ant pattern will be used.

        Specified by:
        mvcMatchers in class AbstractRequestMatcherRegistry<HttpSecurity.RequestMatcherConfigurer>
        Parameters:
        method - the HTTP method to match on
        mvcPatterns - the patterns to match on. The rules for matching are defined by Spring MVC
        Returns:
        the object that is chained after creating the RequestMatcher.
      • mvcMatchers

        public HttpSecurity.MvcMatchersRequestMatcherConfigurer mvcMatchers​(java.lang.String... patterns)
        Description copied from class: AbstractRequestMatcherRegistry

        Maps an MvcRequestMatcher that does not care which HttpMethod is used. This matcher will use the same rules that Spring MVC uses for matching. For example, often times a mapping of the path "/path" will match on "/path", "/path/", "/path.html", etc.

        If the current request will not be processed by Spring MVC, a reasonable default using the pattern as a ant pattern will be used.

        Specified by:
        mvcMatchers in class AbstractRequestMatcherRegistry<HttpSecurity.RequestMatcherConfigurer>
        Parameters:
        patterns - the patterns to match on. The rules for matching are defined by Spring MVC
        Returns:
        the object that is chained after creating the RequestMatcher.