public abstract class RequestMappingInfoHandlerMapping extends AbstractHandlerMethodMapping<RequestMappingInfo>
RequestMappingInfo defines
the mapping between a request and a handler method.mappingsLoggerloggerBEST_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_ATTRIBUTEHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Modifier | Constructor and Description |
|---|---|
protected |
RequestMappingInfoHandlerMapping() |
| Modifier and Type | Method and Description |
|---|---|
protected Set<String> |
getDirectPaths(RequestMappingInfo info)
Return the request mapping paths that are not patterns.
|
protected HandlerMethod |
getHandlerInternal(HttpServletRequest request)
Look up a handler method for the given request.
|
protected Comparator<RequestMappingInfo> |
getMappingComparator(HttpServletRequest request)
Provide a Comparator to sort RequestMappingInfos matched to a request.
|
protected Set<String> |
getMappingPathPatterns(RequestMappingInfo info)
Get the URL path patterns associated with the supplied
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,
String lookupPath,
HttpServletRequest request)
Expose URI template variables, matrix variables, and producible media types in the request.
|
protected HandlerMethod |
handleNoMatch(Set<RequestMappingInfo> infos,
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.
|
afterPropertiesSet, createHandlerMethod, detectHandlerMethods, getCandidateBeanNames, getCorsConfiguration, getHandlerMethods, getHandlerMethodsForMappingName, getMappingForMethod, getNamingStrategy, handlerMethodsInitialized, hasCorsConfigurationSource, initCorsConfiguration, initHandlerMethods, isHandler, lookupHandlerMethod, processCandidateBean, registerHandlerMethod, registerMapping, setDetectHandlerMethodsInAncestorContexts, setHandlerMethodMappingNamingStrategy, setPatternParser, unregisterMappingadaptInterceptor, detectMappedInterceptors, extendInterceptors, formatMappingName, getAdaptedInterceptors, getCorsConfigurationSource, getCorsHandlerExecutionChain, getCorsProcessor, getDefaultHandler, getHandler, getHandlerExecutionChain, getMappedInterceptors, getOrder, getPathMatcher, getPatternParser, getUrlPathHelper, initApplicationContext, initInterceptors, initLookupPath, setAlwaysUseFullPath, setBeanName, setCorsConfigurations, setCorsConfigurationSource, setCorsProcessor, setDefaultHandler, setInterceptors, setOrder, setPathMatcher, setRemoveSemicolonContent, setUrlDecode, setUrlPathHelper, usesPathPatternsgetServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContextgetApplicationContext, getMessageSourceAccessor, obtainApplicationContext, requiredContextClass, setApplicationContextprotected Set<String> getMappingPathPatterns(RequestMappingInfo info)
RequestMappingInfo.getMappingPathPatterns in class AbstractHandlerMethodMapping<RequestMappingInfo>protected Set<String> getDirectPaths(RequestMappingInfo info)
AbstractHandlerMethodMappinggetDirectPaths 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 Comparator<RequestMappingInfo> getMappingComparator(HttpServletRequest request)
getMappingComparator in class AbstractHandlerMethodMapping<RequestMappingInfo>request - the current requestnull)@Nullable protected HandlerMethod getHandlerInternal(HttpServletRequest request) throws Exception
AbstractHandlerMethodMappinggetHandlerInternal in class AbstractHandlerMethodMapping<RequestMappingInfo>request - current HTTP requestnull if none foundException - if there is an internal errorprotected void handleMatch(RequestMappingInfo info, 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_ATTRIBUTEprotected HandlerMethod handleNoMatch(Set<RequestMappingInfo> infos, 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