org.parancoe.web.controller
Class AnnotationHandlerMapping
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.BeanNameUrlHandlerMapping
org.parancoe.web.controller.AnnotationHandlerMapping
- All Implemented Interfaces:
- org.springframework.context.ApplicationContextAware, org.springframework.core.Ordered, org.springframework.web.context.ServletContextAware, org.springframework.web.servlet.HandlerMapping
public class AnnotationHandlerMapping
- extends org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping
An HandlerMapping implementation that reads url mapping from annotations.
Annotation supported are:
DefaultUrlMapping
UrlMapping
MultiUrlMapping
This handlerMapping inherits directly from BeanNameUrlHandlerMapping, in this
way it's still possible to map urls to controller using the 'name' attribute.
- Version:
- $Revision$
- Author:
- Andrea Nasato
| 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 |
| Methods inherited from class org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping |
detectHandlers, determineUrlsForHandler, setDetectHandlersInAncestorContexts |
| Methods inherited from class org.springframework.web.servlet.handler.AbstractUrlHandlerMapping |
exposePathWithinMapping, getHandlerInternal, getHandlerMap, getRootHandler, lookupHandler, registerHandler, registerHandler, setAlwaysUseFullPath, setLazyInitHandlers, setPathMatcher, setRootHandler, setUrlDecode, setUrlPathHelper |
| 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, 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 |
AnnotationHandlerMapping
public AnnotationHandlerMapping()
initApplicationContext
public void initApplicationContext()
throws org.springframework.context.ApplicationContextException
- Overrides:
initApplicationContext in class org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping
- Throws:
org.springframework.context.ApplicationContextException
setDefaultExtension
public void setDefaultExtension(java.lang.String defaultExtension)
getDefaultExtension
public java.lang.String getDefaultExtension()
registerHandlers
protected void registerHandlers()
- Iterates over beans of type Controller registered in the current spring context
searching for UrlAnnotation and MultiUrlAnnotation.
If a controller doesn't have annotations we search in the superclass. This is
the case of AbstractControllers: the concrete implementation does not
inherit annotations which may have been provided by the superclass
Copyright © 2007 JUG Padova Parancoe Team. All Rights Reserved.