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 RequestMatcher
allOf
(RequestMatcher... matchers) Creates aRequestMatcher
that matches if all the givenRequestMatcher
s match, ifmatchers
are empty then the returned matcher always matches.static RequestMatcher
anyOf
(RequestMatcher... matchers) Creates aRequestMatcher
that matches if at least one of the givenRequestMatcher
s matches, ifmatchers
are empty then the returned matcher never matches.static RequestMatcher
not
(RequestMatcher matcher) Creates aRequestMatcher
that matches if the givenRequestMatcher
does not match.
-
Method Details
-
anyOf
Creates aRequestMatcher
that matches if at least one of the givenRequestMatcher
s matches, ifmatchers
are empty then the returned matcher never matches.- Parameters:
matchers
- theRequestMatcher
s to use- Returns:
- the any-of composed
RequestMatcher
- See Also:
-
allOf
Creates aRequestMatcher
that matches if all the givenRequestMatcher
s match, ifmatchers
are empty then the returned matcher always matches.- Parameters:
matchers
- theRequestMatcher
s to use- Returns:
- the all-of composed
RequestMatcher
- See Also:
-
not
Creates aRequestMatcher
that matches if the givenRequestMatcher
does not match.- Parameters:
matcher
- theRequestMatcher
to use- Returns:
- the inverted
RequestMatcher
-