类 RequestMappingInfoHandlerMapping
java.lang.Object
cn.taketoday.context.support.ApplicationObjectSupport
cn.taketoday.web.handler.AbstractHandlerMapping
cn.taketoday.web.handler.method.AbstractHandlerMethodMapping<RequestMappingInfo>
cn.taketoday.web.handler.method.RequestMappingInfoHandlerMapping
- 所有已实现的接口:
cn.taketoday.beans.factory.Aware,cn.taketoday.beans.factory.BeanNameAware,cn.taketoday.beans.factory.InitializingBean,cn.taketoday.context.ApplicationContextAware,cn.taketoday.context.expression.EmbeddedValueResolverAware,cn.taketoday.core.Ordered,HandlerMapping
- 直接已知子类:
RequestMappingHandlerMapping
public abstract class RequestMappingInfoHandlerMapping
extends AbstractHandlerMethodMapping<RequestMappingInfo>
Abstract base class for classes for which
RequestMappingInfo defines
the mapping between a request and a handler method.- 从以下版本开始:
- 4.0 2022/4/1 22:33
- 作者:
- Arjen Poutsma, Rossen Stoyanchev, Harry Yang
-
嵌套类概要
嵌套类修饰符和类型类说明private static classDefault handler for HTTP OPTIONS.private static classAggregate all partial matches and expose methods checking across them.从类继承的嵌套类/接口 cn.taketoday.web.handler.method.AbstractHandlerMethodMapping
AbstractHandlerMethodMapping.MappingRegistration<T>, AbstractHandlerMethodMapping.MappingRegistry, AbstractHandlerMethodMapping.Match<T> -
字段概要
字段从类继承的字段 cn.taketoday.web.handler.method.AbstractHandlerMethodMapping
mappingRegistry从类继承的字段 cn.taketoday.web.handler.AbstractHandlerMapping
embeddedValueResolver, mappingsLogger从类继承的字段 cn.taketoday.context.support.ApplicationObjectSupport
applicationContext, log, messageSourceAccessor从接口继承的字段 cn.taketoday.web.HandlerMapping
HANDLER_MAPPING_BEAN_NAME从接口继承的字段 cn.taketoday.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明Return the request mapping paths that are not patterns.protected Comparator<RequestMappingInfo>getMappingComparator(RequestContext request) Provide a Comparator to sort RequestMappingInfos matched to a request.protected RequestMappingInfogetMatchingMapping(RequestMappingInfo info, RequestContext 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 voidhandleMatch(AbstractHandlerMethodMapping.Match<RequestMappingInfo> bestMatch, String directLookupPath, RequestContext request) Expose URI template variables, matrix variables, and producible media types in the request.protected HandlerMethodhandleNoMatch(Set<RequestMappingInfo> infos, String lookupPath, RequestContext request) Iterate all RequestMappingInfo's once again, look if any match by URL at least and raise exceptions according to what doesn't match.从类继承的方法 cn.taketoday.web.handler.method.AbstractHandlerMethodMapping
afterPropertiesSet, createHandlerMethod, detectHandlerMethods, getCandidateBeanNames, getCorsConfiguration, getHandlerInterceptors, getHandlerInternal, getHandlerMethods, getHandlerMethodsForMappingName, getInterceptors, getMappingForMethod, getNamingStrategy, handlerMethodsInitialized, hasCorsConfigurationSource, initCorsConfiguration, initHandlerMethods, isHandler, lookupHandlerMethod, processCandidateBean, registerHandlerMethod, registerMapping, setDetectHandlerMethodsInAncestorContexts, setHandlerMethodMappingNamingStrategy, setUseInheritedInterceptor, unregisterMapping从类继承的方法 cn.taketoday.web.handler.AbstractHandlerMapping
detectMappedInterceptors, extendInterceptors, formatMappingName, getCorsConfigurationSource, getCorsHandlerExecutionChain, getCorsProcessor, getDefaultHandler, getHandler, getHandlerExecutionChain, getOrder, getPatternParser, initApplicationContext, resolveEmbeddedVariables, setBeanName, setCorsConfigurations, setCorsConfigurationSource, setCorsProcessor, setDefaultHandler, setEmbeddedValueResolver, setInterceptors, setOrder, setUseCaseSensitiveMatch, setUseTrailingSlashMatch从类继承的方法 cn.taketoday.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, initApplicationContext, isContextRequired, obtainApplicationContext, requiredContextClass, setApplicationContext, unwrapContext, unwrapFactory
-
字段详细资料
-
HTTP_OPTIONS_HANDLE_METHOD
-
-
构造器详细资料
-
RequestMappingInfoHandlerMapping
protected RequestMappingInfoHandlerMapping()
-
-
方法详细资料
-
getDirectPaths
从类复制的说明:AbstractHandlerMethodMappingReturn the request mapping paths that are not patterns. -
getMatchingMapping
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.- 指定者:
getMatchingMapping在类中AbstractHandlerMethodMapping<RequestMappingInfo>- 参数:
info- the mapping to get a match forrequest- the current HTTP servlet request- 返回:
- an info in case of a match; or
nullotherwise.
-
getMappingComparator
Provide a Comparator to sort RequestMappingInfos matched to a request.- 指定者:
getMappingComparator在类中AbstractHandlerMethodMapping<RequestMappingInfo>- 参数:
request- the current request- 返回:
- the comparator (never
null)
-
handleMatch
protected void handleMatch(AbstractHandlerMethodMapping.Match<RequestMappingInfo> bestMatch, String directLookupPath, RequestContext request) Expose URI template variables, matrix variables, and producible media types in the request.- 覆盖:
handleMatch在类中AbstractHandlerMethodMapping<RequestMappingInfo>- 参数:
bestMatch- the best match metadatadirectLookupPath- mapping lookup path within the current servlet mappingrequest- the current request
-
handleNoMatch
protected HandlerMethod handleNoMatch(Set<RequestMappingInfo> infos, String lookupPath, RequestContext request) Iterate all RequestMappingInfo's once again, look if any match by URL at least and raise exceptions according to what doesn't match.- 覆盖:
handleNoMatch在类中AbstractHandlerMethodMapping<RequestMappingInfo>- 参数:
infos- all registered mappingslookupPath- mapping lookup path within the current servlet mappingrequest- the current request- 抛出:
HttpRequestMethodNotSupportedException- if there are matches by URL but not by HTTP methodHttpMediaTypeNotAcceptableException- if there are matches by URL but not by consumable/producible media types
-