Interface MatchableHandlerMapping

All Superinterfaces:
HandlerMapping
All Known Implementing Classes:
AbstractDetectingUrlHandlerMapping, AbstractUrlHandlerMapping, BeanNameUrlHandlerMapping, RequestMappingHandlerMapping, SimpleUrlHandlerMapping

public interface MatchableHandlerMapping extends HandlerMapping
Additional interface that a HandlerMapping can implement to expose a request matching API aligned with its internal request matching configuration and implementation.
Since:
4.3.1
Author:
Rossen Stoyanchev
See Also:
  • Method Details

    • getPatternParser

      @Nullable default org.springframework.web.util.pattern.PathPatternParser getPatternParser()
      Return the parser of this HandlerMapping, if configured in which case pre-parsed patterns are used.
      Since:
      5.3
    • match

      @Nullable RequestMatchResult match(HttpServletRequest request, String pattern)
      Determine whether the request matches the given pattern. Use this method when getPatternParser() returns null which means that the HandlerMapping is using String pattern matching.
      Parameters:
      request - the current request
      pattern - the pattern to match
      Returns:
      the result from request matching, or null if none