Class ELRequestMatcher
java.lang.Object
org.springframework.security.web.util.matcher.ELRequestMatcher
- All Implemented Interfaces:
- RequestMatcher
A RequestMatcher implementation which uses a SpEL expression
 
 With the default EvaluationContext (ELRequestMatcherContext) you can use
 hasIpAddress() and hasHeader()
 
 See DelegatingAuthenticationEntryPoint for an example configuration.
 
- Since:
- 3.0.2
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.springframework.security.web.util.matcher.RequestMatcherRequestMatcher.MatchResult
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionorg.springframework.expression.EvaluationContextcreateELContext(jakarta.servlet.http.HttpServletRequest request) Subclasses can override this methode if they want to use a different EL root contextbooleanmatches(jakarta.servlet.http.HttpServletRequest request) Decides whether the rule implemented by the strategy matches the supplied request.toString()Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.security.web.util.matcher.RequestMatchermatcher
- 
Constructor Details- 
ELRequestMatcher
 
- 
- 
Method Details- 
matchespublic boolean matches(jakarta.servlet.http.HttpServletRequest request) Description copied from interface:RequestMatcherDecides whether the rule implemented by the strategy matches the supplied request.- Specified by:
- matchesin interface- RequestMatcher
- Parameters:
- request- the request to check for a match
- Returns:
- true if the request matches, false otherwise
 
- 
createELContextpublic org.springframework.expression.EvaluationContext createELContext(jakarta.servlet.http.HttpServletRequest request) Subclasses can override this methode if they want to use a different EL root context- Returns:
- EL root context which is used to evaluate the expression
 
- 
toString
 
-