| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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
public abstract class AbstractControllerUrlHandlerMapping
Base class for HandlerMapping implementations
 that derive URL paths according to conventions for specific controller types.
ControllerClassNameHandlerMapping, 
ControllerBeanNameHandlerMapping| Field Summary | 
|---|
| Fields inherited from class org.springframework.context.support.ApplicationObjectSupport | 
|---|
| logger | 
| Fields inherited from interface org.springframework.web.servlet.HandlerMapping | 
|---|
| PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE | 
| Fields inherited from interface org.springframework.core.Ordered | 
|---|
| HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE | 
| Constructor Summary | |
|---|---|
| AbstractControllerUrlHandlerMapping()Activates detection of annotated controllers when running on JDK 1.5 or higher. | |
| Method Summary | |
|---|---|
| protected abstract  String[] | buildUrlsForHandler(String beanName,
                    Class beanClass)Abstract template method to be implemented by subclasses. | 
| protected  String[] | determineUrlsForHandler(String beanName)This implementation delegates to buildUrlsForHandler(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. | 
| Methods inherited from class org.springframework.web.servlet.handler.AbstractDetectingUrlHandlerMapping | 
|---|
| detectHandlers, initApplicationContext, setDetectHandlersInAncestorContexts | 
| Methods inherited from class org.springframework.web.servlet.handler.AbstractUrlHandlerMapping | 
|---|
| buildPathExposingHandler, exposePathWithinMapping, getHandlerInternal, getHandlerMap, getPathMatcher, getRootHandler, lookupHandler, registerHandler, registerHandler, setAlwaysUseFullPath, setLazyInitHandlers, setPathMatcher, setRootHandler, setUrlDecode, setUrlPathHelper, validateHandler | 
| Methods inherited from class org.springframework.web.servlet.handler.AbstractHandlerMapping | 
|---|
| adaptInterceptor, extendInterceptors, getAdaptedInterceptors, getDefaultHandler, getHandler, getHandlerExecutionChain, getOrder, initInterceptors, setDefaultHandler, setInterceptors, setOrder | 
| Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport | 
|---|
| getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext | 
| Methods inherited from class org.springframework.context.support.ApplicationObjectSupport | 
|---|
| getApplicationContext, getMessageSourceAccessor, requiredContextClass, setApplicationContext | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public AbstractControllerUrlHandlerMapping()
| Method Detail | 
|---|
public void setIncludeAnnotatedControllers(boolean includeAnnotatedControllers)
Annotated controllers will by included by default when runnong on JDK 1.5 or higher.
public void setExcludedPackages(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(Class[] excludedClasses)
protected String[] determineUrlsForHandler(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 bean
null or an empty array if none
protected boolean isEligibleForMapping(String beanName,
                                       Class beanClass)
beanName - the name of the controller beanbeanClass - the concrete class of the controller bean
setExcludedPackages(java.lang.String[]), 
setExcludedClasses(java.lang.Class[])protected boolean isControllerType(Class beanClass)
beanClass - the class to introspectprotected boolean isMultiActionControllerType(Class beanClass)
beanClass - the class to introspect
protected abstract String[] buildUrlsForHandler(String beanName,
                                                Class beanClass)
beanName - the name of the beanbeanClass - the type of the bean
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||