Class RequestMatchers
java.lang.Object
org.springframework.security.web.util.matcher.RequestMatchers
A factory class to create
RequestMatcher instances.- Since:
- 6.1
-
Method Summary
Modifier and TypeMethodDescriptionstatic RequestMatcherallOf(RequestMatcher... matchers) Creates aRequestMatcherthat matches if all the givenRequestMatchers match, ifmatchersare empty then the returned matcher always matches.static RequestMatcheranyOf(RequestMatcher... matchers) Creates aRequestMatcherthat matches if at least one of the givenRequestMatchers matches, ifmatchersare empty then the returned matcher never matches.static RequestMatchernot(RequestMatcher matcher) Creates aRequestMatcherthat matches if the givenRequestMatcherdoes not match.
-
Method Details
-
anyOf
Creates aRequestMatcherthat matches if at least one of the givenRequestMatchers matches, ifmatchersare empty then the returned matcher never matches.- Parameters:
matchers- theRequestMatchers to use- Returns:
- the any-of composed
RequestMatcher - See Also:
-
allOf
Creates aRequestMatcherthat matches if all the givenRequestMatchers match, ifmatchersare empty then the returned matcher always matches.- Parameters:
matchers- theRequestMatchers to use- Returns:
- the all-of composed
RequestMatcher - See Also:
-
not
Creates aRequestMatcherthat matches if the givenRequestMatcherdoes not match.- Parameters:
matcher- theRequestMatcherto use- Returns:
- the inverted
RequestMatcher
-