public interface MatchableHandlerMapping extends HandlerMapping
HandlerMapping
can implement to expose
a request matching API aligned with its internal request matching
configuration and implementation.HandlerMappingIntrospector
BEST_MATCHING_HANDLER_ATTRIBUTE, BEST_MATCHING_PATTERN_ATTRIBUTE, INTROSPECT_TYPE_LEVEL_MAPPING, LOOKUP_PATH, MATRIX_VARIABLES_ATTRIBUTE, PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE, PRODUCIBLE_MEDIA_TYPES_ATTRIBUTE, URI_TEMPLATE_VARIABLES_ATTRIBUTE
Modifier and Type | Method and Description |
---|---|
default PathPatternParser |
getPatternParser()
Return the parser of this
HandlerMapping , if configured in which
case pre-parsed patterns are used. |
RequestMatchResult |
match(HttpServletRequest request,
String pattern)
Determine whether the request matches the given pattern.
|
getHandler, usesPathPatterns
@Nullable default PathPatternParser getPatternParser()
HandlerMapping
, if configured in which
case pre-parsed patterns are used.@Nullable RequestMatchResult match(HttpServletRequest request, String pattern)
getPatternParser()
returns null
which means that the
HandlerMapping
is uses String pattern matching.request
- the current requestpattern
- the pattern to matchnull
if none