类 AbstractControllerUrlHandlerMapping
- java.lang.Object
- org.springframework.context.support.ApplicationObjectSupport
- org.springframework.web.context.support.WebApplicationObjectSupport
- org.springframework.web.servlet.handler.AbstractHandlerMapping
- org.springframework.web.servlet.handler.AbstractUrlHandlerMapping
- org.springframework.web.servlet.handler.AbstractDetectingUrlHandlerMapping
- org.springframework.web.servlet.mvc.support.AbstractControllerUrlHandlerMapping
- 所有已实现的接口:
Aware
,ApplicationContextAware
,Ordered
,ServletContextAware
,MatchableHandlerMapping
,HandlerMapping
@Deprecated public abstract class AbstractControllerUrlHandlerMapping extends AbstractDetectingUrlHandlerMapping
已过时。as of 4.3, in favor of annotation-driven handler methodsBase class forHandlerMapping
implementations that derive URL paths according to conventions for specific controller types.- 从以下版本开始:
- 2.5.3
- 作者:
- Juergen Hoeller
- 另请参阅:
ControllerClassNameHandlerMapping
,ControllerBeanNameHandlerMapping
字段概要
从类继承的字段 org.springframework.context.support.ApplicationObjectSupport
logger
从接口继承的字段 org.springframework.web.servlet.HandlerMapping
BEST_MATCHING_HANDLER_ATTRIBUTE, BEST_MATCHING_PATTERN_ATTRIBUTE, INTROSPECT_TYPE_LEVEL_MAPPING, MATRIX_VARIABLES_ATTRIBUTE, PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE, PRODUCIBLE_MEDIA_TYPES_ATTRIBUTE, URI_TEMPLATE_VARIABLES_ATTRIBUTE
从接口继承的字段 org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
构造器概要
构造器 构造器 说明 AbstractControllerUrlHandlerMapping()
已过时。
方法概要
所有方法 实例方法 抽象方法 具体方法 已过时的方法 修饰符和类型 方法 说明 protected abstract String[]
buildUrlsForHandler(String beanName, Class<?> beanClass)
已过时。Abstract template method to be implemented by subclasses.protected String[]
determineUrlsForHandler(String beanName)
已过时。This implementation delegates tobuildUrlsForHandler(java.lang.String, java.lang.Class<?>)
, provided thatisEligibleForMapping(java.lang.String, java.lang.Class<?>)
returnstrue
.protected boolean
isControllerType(Class<?> beanClass)
已过时。Determine whether the given bean class indicates a controller type that is supported by this mapping strategy.protected boolean
isEligibleForMapping(String beanName, Class<?> beanClass)
已过时。Determine whether the specified controller is excluded from this mapping.protected boolean
isMultiActionControllerType(Class<?> beanClass)
已过时。Determine whether the given bean class indicates a controller type that dispatches to multiple action methods.void
setExcludedClasses(Class<?>... excludedClasses)
已过时。Specify controller classes that should be excluded from this mapping.void
setExcludedPackages(String... excludedPackages)
已过时。Specify Java packages that should be excluded from this mapping.void
setIncludeAnnotatedControllers(boolean includeAnnotatedControllers)
已过时。Set whether to activate or deactivate detection of annotated controllers.从类继承的方法 org.springframework.web.servlet.handler.AbstractDetectingUrlHandlerMapping
detectHandlers, initApplicationContext, setDetectHandlersInAncestorContexts
从类继承的方法 org.springframework.web.servlet.handler.AbstractUrlHandlerMapping
buildPathExposingHandler, exposePathWithinMapping, exposeUriTemplateVariables, getHandlerInternal, getHandlerMap, getRootHandler, lookupHandler, match, registerHandler, registerHandler, setLazyInitHandlers, setRootHandler, setUseTrailingSlashMatch, supportsTypeLevelMappings, useTrailingSlashMatch, validateHandler
从类继承的方法 org.springframework.web.servlet.handler.AbstractHandlerMapping
adaptInterceptor, detectMappedInterceptors, extendInterceptors, getAdaptedInterceptors, getCorsConfiguration, getCorsConfigurations, getCorsHandlerExecutionChain, getCorsProcessor, getDefaultHandler, getHandler, getHandlerExecutionChain, getMappedInterceptors, getOrder, getPathMatcher, getUrlPathHelper, initInterceptors, setAlwaysUseFullPath, setCorsConfigurations, setCorsProcessor, setDefaultHandler, setInterceptors, setOrder, setPathMatcher, setRemoveSemicolonContent, setUrlDecode, setUrlPathHelper
从类继承的方法 org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
从类继承的方法 org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, requiredContextClass, setApplicationContext
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 org.springframework.web.servlet.HandlerMapping
getHandler
构造器详细资料
AbstractControllerUrlHandlerMapping
public AbstractControllerUrlHandlerMapping()
已过时。
方法详细资料
setIncludeAnnotatedControllers
public void setIncludeAnnotatedControllers(boolean includeAnnotatedControllers)
已过时。Set whether to activate or deactivate detection of annotated controllers.
setExcludedPackages
public void setExcludedPackages(String... excludedPackages)
已过时。Specify Java packages that should be excluded from this mapping. Any classes in such a package (or any of its subpackages) will be ignored by this HandlerMapping.Default is to exclude the entire "org.springframework.web.servlet.mvc" package, including its subpackages, since none of Spring's out-of-the-box Controller implementations is a reasonable candidate for this mapping strategy. Such controllers are typically handled by a separate HandlerMapping, e.g. a
BeanNameUrlHandlerMapping
, alongside this ControllerClassNameHandlerMapping for application controllers.
setExcludedClasses
public void setExcludedClasses(Class<?>... excludedClasses)
已过时。Specify controller classes that should be excluded from this mapping. Any such classes will simply be ignored by this HandlerMapping.
determineUrlsForHandler
protected String[] determineUrlsForHandler(String beanName)
已过时。This implementation delegates tobuildUrlsForHandler(java.lang.String, java.lang.Class<?>)
, provided thatisEligibleForMapping(java.lang.String, java.lang.Class<?>)
returnstrue
.- 指定者:
determineUrlsForHandler
在类中AbstractDetectingUrlHandlerMapping
- 参数:
beanName
- the name of the candidate bean- 返回:
- the URLs determined for the bean, or
null
or an empty array if none
isEligibleForMapping
protected boolean isEligibleForMapping(String beanName, Class<?> beanClass)
已过时。Determine whether the specified controller is excluded from this mapping.- 参数:
beanName
- the name of the controller beanbeanClass
- the concrete class of the controller bean- 返回:
- whether the specified class is excluded
- 另请参阅:
setExcludedPackages(java.lang.String...)
,setExcludedClasses(java.lang.Class<?>...)
isControllerType
protected boolean isControllerType(Class<?> beanClass)
已过时。Determine whether the given bean class indicates a controller type that is supported by this mapping strategy.- 参数:
beanClass
- the class to introspect
isMultiActionControllerType
protected boolean isMultiActionControllerType(Class<?> beanClass)
已过时。Determine whether the given bean class indicates a controller type that dispatches to multiple action methods.- 参数:
beanClass
- the class to introspect
buildUrlsForHandler
protected abstract String[] buildUrlsForHandler(String beanName, Class<?> beanClass)
已过时。Abstract template method to be implemented by subclasses.- 参数:
beanName
- the name of the beanbeanClass
- the type of the bean- 返回:
- the URLs determined for the bean