类 BeanNameUrlHandlerMapping
java.lang.Object
cn.taketoday.context.support.ApplicationObjectSupport
cn.taketoday.web.handler.AbstractHandlerMapping
cn.taketoday.web.handler.AbstractUrlHandlerMapping
cn.taketoday.web.handler.AbstractDetectingUrlHandlerMapping
cn.taketoday.web.handler.BeanNameUrlHandlerMapping
- 所有已实现的接口:
cn.taketoday.beans.factory.Aware,cn.taketoday.beans.factory.BeanNameAware,cn.taketoday.context.ApplicationContextAware,cn.taketoday.context.expression.EmbeddedValueResolverAware,cn.taketoday.core.Ordered,HandlerMapping
Implementation of the
HandlerMapping interface that maps from URLs
to beans with names that start with a slash ("/"), similar to how Struts
maps URLs to action names.
This is the default implementation used by the
DispatcherHandler, along with
RequestMappingHandlerMapping.
Alternatively, SimpleUrlHandlerMapping
allows for customizing a handler mapping declaratively.
The mapping is from URL to bean name. Thus an incoming URL "/foo" would map to a handler named "/foo", or to "/foo /foo2" in case of multiple mappings to a single handler.
Supports direct matches (given "/test" -> registered "/test") and "*"
matches (given "/test" -> registered "/t*"). For details on the pattern
options, see the PathPattern javadoc.
Supports alias placeholder resolving
- 从以下版本开始:
- 4.0 2022/1/29 00:30
- 作者:
- Rod Johnson, Juergen Hoeller, Harry Yang
- 另请参阅:
-
字段概要
从类继承的字段 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 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected String[]determineUrlsForHandler(String beanName) Checks name and aliases of the given bean for URLs, starting with "/".从类继承的方法 cn.taketoday.web.handler.AbstractDetectingUrlHandlerMapping
detectHandlers, initApplicationContext, setDetectHandlersInAncestorContexts从类继承的方法 cn.taketoday.web.handler.AbstractUrlHandlerMapping
doPutPathPattern, duPutHandler, getHandlerInternal, getHandlerMap, getPathPatternHandlerMap, getRootHandler, lookupHandler, registerHandler, registerHandler, setLazyInitHandlers, setRootHandler, validateHandler从类继承的方法 cn.taketoday.web.handler.AbstractHandlerMapping
detectMappedInterceptors, extendInterceptors, formatMappingName, getCorsConfiguration, getCorsConfigurationSource, getCorsHandlerExecutionChain, getCorsProcessor, getDefaultHandler, getHandler, getHandlerExecutionChain, getHandlerInterceptors, getOrder, getPatternParser, hasCorsConfigurationSource, 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
-
构造器详细资料
-
BeanNameUrlHandlerMapping
public BeanNameUrlHandlerMapping()
-
-
方法详细资料
-
determineUrlsForHandler
Checks name and aliases of the given bean for URLs, starting with "/".- 指定者:
determineUrlsForHandler在类中AbstractDetectingUrlHandlerMapping- 参数:
beanName- the name of the candidate bean- 返回:
- the URLs determined for the bean, or an empty array if none
-