@Deprecated public abstract class AbstractControllerUrlHandlerMapping extends AbstractDetectingUrlHandlerMapping
HandlerMapping implementations
that derive URL paths according to conventions for specific controller types.ControllerClassNameHandlerMapping,
ControllerBeanNameHandlerMappingloggerBEST_MATCHING_PATTERN_ATTRIBUTE, INTROSPECT_TYPE_LEVEL_MAPPING, MATRIX_VARIABLES_ATTRIBUTE, PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE, PRODUCIBLE_MEDIA_TYPES_ATTRIBUTE, URI_TEMPLATE_VARIABLES_ATTRIBUTEHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Constructor and Description |
|---|
AbstractControllerUrlHandlerMapping()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract java.lang.String[] |
buildUrlsForHandler(java.lang.String beanName,
java.lang.Class<?> beanClass)
Deprecated.
Abstract template method to be implemented by subclasses.
|
protected java.lang.String[] |
determineUrlsForHandler(java.lang.String beanName)
Deprecated.
This implementation delegates to
buildUrlsForHandler(java.lang.String, java.lang.Class<?>),
provided that isEligibleForMapping(java.lang.String, java.lang.Class<?>) returns true. |
protected boolean |
isControllerType(java.lang.Class<?> beanClass)
Deprecated.
Determine whether the given bean class indicates a controller type
that is supported by this mapping strategy.
|
protected boolean |
isEligibleForMapping(java.lang.String beanName,
java.lang.Class<?> beanClass)
Deprecated.
Determine whether the specified controller is excluded from this mapping.
|
protected boolean |
isMultiActionControllerType(java.lang.Class<?> beanClass)
Deprecated.
Determine whether the given bean class indicates a controller type
that dispatches to multiple action methods.
|
void |
setExcludedClasses(java.lang.Class<?>... excludedClasses)
Deprecated.
Specify controller classes that should be excluded from this mapping.
|
void |
setExcludedPackages(java.lang.String... excludedPackages)
Deprecated.
Specify Java packages that should be excluded from this mapping.
|
void |
setIncludeAnnotatedControllers(boolean includeAnnotatedControllers)
Deprecated.
Set whether to activate or deactivate detection of annotated controllers.
|
detectHandlers, initApplicationContext, setDetectHandlersInAncestorContextsbuildPathExposingHandler, exposePathWithinMapping, exposeUriTemplateVariables, getHandlerInternal, getHandlerMap, getRootHandler, lookupHandler, match, registerHandler, registerHandler, setLazyInitHandlers, setRootHandler, setUseTrailingSlashMatch, supportsTypeLevelMappings, useTrailingSlashMatch, validateHandleradaptInterceptor, detectMappedInterceptors, extendInterceptors, getAdaptedInterceptors, getCorsConfiguration, getCorsConfigurations, getCorsHandlerExecutionChain, getCorsProcessor, getDefaultHandler, getHandler, getHandlerExecutionChain, getMappedInterceptors, getOrder, getPathMatcher, getUrlPathHelper, initInterceptors, setAlwaysUseFullPath, setCorsConfigurations, setCorsProcessor, setDefaultHandler, setInterceptors, setOrder, setPathMatcher, setRemoveSemicolonContent, setUrlDecode, setUrlPathHelpergetServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContextgetApplicationContext, getMessageSourceAccessor, requiredContextClass, setApplicationContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetHandlerpublic AbstractControllerUrlHandlerMapping()
public void setIncludeAnnotatedControllers(boolean includeAnnotatedControllers)
public void setExcludedPackages(java.lang.String... excludedPackages)
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.
public void setExcludedClasses(java.lang.Class<?>... excludedClasses)
protected java.lang.String[] determineUrlsForHandler(java.lang.String beanName)
buildUrlsForHandler(java.lang.String, java.lang.Class<?>),
provided that isEligibleForMapping(java.lang.String, java.lang.Class<?>) returns true.determineUrlsForHandler in class AbstractDetectingUrlHandlerMappingbeanName - the name of the candidate beannull or an empty array if noneprotected boolean isEligibleForMapping(java.lang.String beanName,
java.lang.Class<?> beanClass)
beanName - the name of the controller beanbeanClass - the concrete class of the controller beansetExcludedPackages(java.lang.String...),
setExcludedClasses(java.lang.Class<?>...)protected boolean isControllerType(java.lang.Class<?> beanClass)
beanClass - the class to introspectprotected boolean isMultiActionControllerType(java.lang.Class<?> beanClass)
beanClass - the class to introspectprotected abstract java.lang.String[] buildUrlsForHandler(java.lang.String beanName,
java.lang.Class<?> beanClass)
beanName - the name of the beanbeanClass - the type of the bean