public abstract class RequestMappingInfoHandlerMapping extends AbstractHandlerMethodMapping<RequestMappingInfo>
RequestMappingInfo
defines
the mapping between a request and a handler method.Modifier and Type | Class and Description |
---|---|
private static class |
RequestMappingInfoHandlerMapping.HttpOptionsHandler
Default handler for HTTP OPTIONS.
|
private static class |
RequestMappingInfoHandlerMapping.PartialMatchHelper
Aggregate all partial matches and expose methods checking across them.
|
Modifier and Type | Field and Description |
---|---|
private static java.lang.reflect.Method |
HTTP_OPTIONS_HANDLE_METHOD |
logger
BEST_MATCHING_PATTERN_ATTRIBUTE, INTROSPECT_TYPE_LEVEL_MAPPING, MATRIX_VARIABLES_ATTRIBUTE, PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE, PRODUCIBLE_MEDIA_TYPES_ATTRIBUTE, URI_TEMPLATE_VARIABLES_ATTRIBUTE
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Modifier | Constructor and Description |
---|---|
protected |
RequestMappingInfoHandlerMapping() |
Modifier and Type | Method and Description |
---|---|
private java.util.Map<java.lang.String,MultiValueMap<java.lang.String,java.lang.String>> |
extractMatrixVariables(HttpServletRequest request,
java.util.Map<java.lang.String,java.lang.String> uriVariables) |
protected java.util.Comparator<RequestMappingInfo> |
getMappingComparator(HttpServletRequest request)
Provide a Comparator to sort RequestMappingInfos matched to a request.
|
protected java.util.Set<java.lang.String> |
getMappingPathPatterns(RequestMappingInfo info)
Get the URL path patterns associated with this
RequestMappingInfo . |
protected RequestMappingInfo |
getMatchingMapping(RequestMappingInfo info,
HttpServletRequest request)
Check if the given RequestMappingInfo matches the current request and
return a (potentially new) instance with conditions that match the
current request -- for example with a subset of URL patterns.
|
protected void |
handleMatch(RequestMappingInfo info,
java.lang.String lookupPath,
HttpServletRequest request)
Expose URI template variables, matrix variables, and producible media types in the request.
|
protected HandlerMethod |
handleNoMatch(java.util.Set<RequestMappingInfo> infos,
java.lang.String lookupPath,
HttpServletRequest request)
Iterate all RequestMappingInfo's once again, look if any match by URL at
least and raise exceptions according to what doesn't match.
|
private boolean |
isMatrixVariableContentAvailable() |
afterPropertiesSet, createHandlerMethod, detectHandlerMethods, getCorsConfiguration, getHandlerInternal, getHandlerMethods, getHandlerMethodsForMappingName, getMappingForMethod, getNamingStrategy, handlerMethodsInitialized, initCorsConfiguration, initHandlerMethods, isHandler, lookupHandlerMethod, registerHandlerMethod, registerMapping, setDetectHandlerMethodsInAncestorContexts, setHandlerMethodMappingNamingStrategy, unregisterMapping
adaptInterceptor, detectMappedInterceptors, extendInterceptors, getAdaptedInterceptors, getCorsConfigurations, getCorsHandlerExecutionChain, getCorsProcessor, getDefaultHandler, getHandler, getHandlerExecutionChain, getMappedInterceptors, getOrder, getPathMatcher, getUrlPathHelper, initApplicationContext, initInterceptors, setAlwaysUseFullPath, setCorsConfigurations, setCorsProcessor, setDefaultHandler, setInterceptors, setOrder, setPathMatcher, setRemoveSemicolonContent, setUrlDecode, setUrlPathHelper
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
getApplicationContext, getMessageSourceAccessor, requiredContextClass, setApplicationContext
private static final java.lang.reflect.Method HTTP_OPTIONS_HANDLE_METHOD
protected java.util.Set<java.lang.String> getMappingPathPatterns(RequestMappingInfo info)
RequestMappingInfo
.getMappingPathPatterns
in class AbstractHandlerMethodMapping<RequestMappingInfo>
protected RequestMappingInfo getMatchingMapping(RequestMappingInfo info, HttpServletRequest request)
getMatchingMapping
in class AbstractHandlerMethodMapping<RequestMappingInfo>
info
- the mapping to get a match forrequest
- the current HTTP servlet requestnull
otherwise.protected java.util.Comparator<RequestMappingInfo> getMappingComparator(HttpServletRequest request)
getMappingComparator
in class AbstractHandlerMethodMapping<RequestMappingInfo>
request
- the current requestnull
)protected void handleMatch(RequestMappingInfo info, java.lang.String lookupPath, HttpServletRequest request)
handleMatch
in class AbstractHandlerMethodMapping<RequestMappingInfo>
info
- the matching mappinglookupPath
- mapping lookup path within the current servlet mappingrequest
- the current requestHandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE
,
HandlerMapping.MATRIX_VARIABLES_ATTRIBUTE
,
HandlerMapping.PRODUCIBLE_MEDIA_TYPES_ATTRIBUTE
private boolean isMatrixVariableContentAvailable()
private java.util.Map<java.lang.String,MultiValueMap<java.lang.String,java.lang.String>> extractMatrixVariables(HttpServletRequest request, java.util.Map<java.lang.String,java.lang.String> uriVariables)
protected HandlerMethod handleNoMatch(java.util.Set<RequestMappingInfo> infos, java.lang.String lookupPath, HttpServletRequest request) throws ServletException
handleNoMatch
in class AbstractHandlerMethodMapping<RequestMappingInfo>
infos
- all registered mappingslookupPath
- mapping lookup path within the current servlet mappingrequest
- the current requestHttpRequestMethodNotSupportedException
- if there are matches by URL
but not by HTTP methodHttpMediaTypeNotAcceptableException
- if there are matches by URL
but not by consumable/producible media typesServletException
- in case of errors