Class PathPatternRequestMatcher

java.lang.Object
org.springframework.security.web.servlet.util.matcher.PathPatternRequestMatcher
All Implemented Interfaces:
RequestMatcher

public final class PathPatternRequestMatcher extends Object implements RequestMatcher
A RequestMatcher that uses PathPatterns to match against each HttpServletRequest. The provided path should be relative to the context path (that is, it should exclude any context path).

You can provide the servlet path in servletPath and reuse for multiple matchers.

Note that the HandlerMapping that contains the related URI patterns must be using PathPatternParser.defaultInstance. If that is not the case, use PathPatternParser to parse your path and provide a PathPattern in the constructor.

Since:
6.5
  • Method Details