Example usage for org.springframework.security.web DefaultSecurityFilterChain getRequestMatcher

List of usage examples for org.springframework.security.web DefaultSecurityFilterChain getRequestMatcher

Introduction

In this page you can find the example usage for org.springframework.security.web DefaultSecurityFilterChain getRequestMatcher.

Prototype

public RequestMatcher getRequestMatcher() 

Source Link

Usage

From source file:org.springframework.security.config.http.DefaultFilterChainValidator.java

private void checkForDuplicateMatchers(List<SecurityFilterChain> chains) {

    while (chains.size() > 1) {
        DefaultSecurityFilterChain chain = (DefaultSecurityFilterChain) chains.remove(0);

        for (SecurityFilterChain test : chains) {
            if (chain.getRequestMatcher().equals(((DefaultSecurityFilterChain) test).getRequestMatcher())) {
                throw new IllegalArgumentException("The FilterChainProxy contains two filter chains using the"
                        + " matcher " + chain.getRequestMatcher()
                        + ". If you are using multiple <http> namespace "
                        + "elements, you must use a 'pattern' attribute to define the request patterns to which they apply.");
            }//from   w  ww.j a va 2  s  . c  o  m
        }
    }
}