BeanDefinitionParser that provides the configuration for the
<annotation-driven/> MVC namespace element.
This class registers the following HandlerMappings:
RequestMappingHandlerMapping
ordered at 0 for mapping requests to annotated controller methods.
BeanNameUrlHandlerMapping
ordered at 2 to map URL paths to controller bean names.
Note
Additional HandlerMappings may be registered
as a result of using the <view-controller> or the
<resources> MVC namespace elements.
This class registers the following HandlerAdapters:
RequestMappingHandlerAdapter
for processing requests with annotated controller methods.
HttpRequestHandlerAdapter
for processing requests with HttpRequestHandlers.
SimpleControllerHandlerAdapter
for processing requests with interface-based Controllers.
This class registers the following HandlerExceptionResolvers:
ExceptionHandlerExceptionResolver for handling exceptions through
org.springframework.web.bind.annotation.ExceptionHandler methods.
ResponseStatusExceptionResolver for exceptions annotated
with org.springframework.web.bind.annotation.ResponseStatus .
DefaultHandlerExceptionResolver for resolving known Spring
exception types
This class registers an org.
and a org. to be used by:
RequestMappingHandlerMapping,
HandlerMapping for ViewControllers
HandlerMapping for serving resources
path-matching
MVC namespace element.
Both the RequestMappingHandlerAdapter and the
ExceptionHandlerExceptionResolver are configured with instances of
the following by default:
ContentNegotiationManager
DefaultFormattingConversionService
org.springframework.validation.beanvalidation.LocalValidatorFactoryBean
if a JSR-303 implementation is available on the classpath
HttpMessageConverters depending on which third-party
libraries are available on the classpath.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | AnnotationDrivenBeanDefinitionParser.
A FactoryBean for a CompositeUriComponentsContributor that obtains the HandlerMethodArgumentResolver's configured in RequestMappingHandlerAdapter after it is fully initialized. |
| Modifier and Type | Field and Description |
|---|---|
| public static final String | |
| private static final boolean | |
| public static final String | |
| public static final String | |
| private static final boolean | |
| private static final boolean | |
| private static final boolean | |
| private static final boolean | |
| private static final boolean | |
| private static final boolean | |
| private static final boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| protected void | |
| private void | configurePathMatchingProperties(RootBeanDefinition handlerMappingDef, Element element, ParserContext context)
|
| private RootBeanDefinition | |
| private GenericBeanDefinition | |
| private ManagedList | |
| private ManagedList | |
| private RuntimeBeanReference | |
| private String | |
| private RuntimeBeanReference | |
| private RuntimeBeanReference | |
| private Properties | |
| private ManagedList | getInterceptors(Element element, Object source, ParserContext context, String interceptorElementName)
|
| private RuntimeBeanReference | |
| private ManagedList | |
| private ManagedList | |
| private RuntimeBeanReference | |
| public BeanDefinition | parse(Element
the element that is to be parsed into one or more element, ParserContext BeanDefinitionsthe object encapsulating the current state of the parsing process;
provides access to a context)org.Implements org. Parse the specified |
| private ManagedList |
| CONTENT_NEGOTIATION_MANAGER_BEAN_NAME | back to summary |
|---|---|
| public static final String CONTENT_NEGOTIATION_MANAGER_BEAN_NAME | |
| gsonPresent | back to summary |
|---|---|
| private static final boolean gsonPresent | |
| HANDLER_ADAPTER_BEAN_NAME | back to summary |
|---|---|
| public static final String HANDLER_ADAPTER_BEAN_NAME | |
| HANDLER_MAPPING_BEAN_NAME | back to summary |
|---|---|
| public static final String HANDLER_MAPPING_BEAN_NAME | |
| jackson2CborPresent | back to summary |
|---|---|
| private static final boolean jackson2CborPresent | |
| jackson2Present | back to summary |
|---|---|
| private static final boolean jackson2Present | |
| jackson2SmilePresent | back to summary |
|---|---|
| private static final boolean jackson2SmilePresent | |
| jackson2XmlPresent | back to summary |
|---|---|
| private static final boolean jackson2XmlPresent | |
| javaxValidationPresent | back to summary |
|---|---|
| private static final boolean javaxValidationPresent | |
| jaxb2Present | back to summary |
|---|---|
| private static final boolean jaxb2Present | |
| romePresent | back to summary |
|---|---|
| private static final boolean romePresent | |
| AnnotationDrivenBeanDefinitionParser | back to summary |
|---|---|
| pack-priv AnnotationDrivenBeanDefinitionParser() | |
| addRequestBodyAdvice | back to summary |
|---|---|
| protected void addRequestBodyAdvice(RootBeanDefinition beanDef) | |
| addResponseBodyAdvice | back to summary |
|---|---|
| protected void addResponseBodyAdvice(RootBeanDefinition beanDef) | |
| configurePathMatchingProperties | back to summary |
|---|---|
| private void configurePathMatchingProperties(RootBeanDefinition handlerMappingDef, Element element, ParserContext context) | |
| createConverterDefinition | back to summary |
|---|---|
| private RootBeanDefinition createConverterDefinition(Class<?> converterClass, Object source) | |
| createObjectMapperFactoryDefinition | back to summary |
|---|---|
| private GenericBeanDefinition createObjectMapperFactoryDefinition(Object source) | |
| extractBeanSubElements | back to summary |
|---|---|
| private ManagedList | |
| getArgumentResolvers | back to summary |
|---|---|
private ManagedList
| |
| getAsyncExecutor | back to summary |
|---|---|
private RuntimeBeanReference getAsyncExecutor(Element element)
| |
| getAsyncTimeout | back to summary |
|---|---|
private String getAsyncTimeout(Element element)
| |
| getContentNegotiationManager | back to summary |
|---|---|
| private RuntimeBeanReference getContentNegotiationManager(Element element, Object source, ParserContext context) | |
| getConversionService | back to summary |
|---|---|
| private RuntimeBeanReference getConversionService(Element element, Object source, ParserContext context) | |
| getDefaultMediaTypes | back to summary |
|---|---|
| private Properties getDefaultMediaTypes() | |
| getInterceptors | back to summary |
|---|---|
| private ManagedList | |
| getMessageCodesResolver | back to summary |
|---|---|
private RuntimeBeanReference getMessageCodesResolver(Element element)
| |
| getMessageConverters | back to summary |
|---|---|
| private ManagedList | |
| getReturnValueHandlers | back to summary |
|---|---|
private ManagedList
| |
| getValidator | back to summary |
|---|---|
private RuntimeBeanReference getValidator(Element element, Object source, ParserContext context)
| |
| parse | back to summary |
|---|---|
| public BeanDefinition parse(Element element, ParserContext context) Implements org. Doc from org. Parse the specified Implementations must return the primary
| |
| wrapLegacyResolvers | back to summary |
|---|---|
| private ManagedList | |
| Modifier and Type | Field and Description |
|---|---|
| private ConversionService | |
| private RequestMappingHandlerAdapter | |
| private CompositeUriComponentsContributor |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | afterPropertiesSet()
Implements org. Invoked by the containing This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set. |
| public CompositeUriComponentsContributor | getObject()
Implements org. Return an instance (possibly shared or independent) of the object managed by this factory. |
| public Class | getObjectType()
Implements org. Return the type of object that this FactoryBean creates,
or |
| public boolean | isSingleton()
Overrides default org. Is the object managed by this factory a singleton? |
| public void | |
| public void |
| conversionService | back to summary |
|---|---|
| private ConversionService conversionService
| |
| handlerAdapter | back to summary |
|---|---|
| private RequestMappingHandlerAdapter handlerAdapter
| |
| uriComponentsContributor | back to summary |
|---|---|
| private CompositeUriComponentsContributor uriComponentsContributor
| |
| CompositeUriComponentsContributorFactoryBean | back to summary |
|---|---|
| pack-priv CompositeUriComponentsContributorFactoryBean() | |
| afterPropertiesSet | back to summary |
|---|---|
| public void afterPropertiesSet() Implements org. Doc from org. Invoked by the containing This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.
| |
| getObject | back to summary |
|---|---|
| public CompositeUriComponentsContributor getObject() Implements org. Doc from org. Return an instance (possibly shared or independent) of the object managed by this factory. As with a If this FactoryBean is not fully initialized yet at the time of
the call (for example because it is involved in a circular reference),
throw a corresponding As of Spring 2.0, FactoryBeans are allowed to return
| |
| getObjectType | back to summary |
|---|---|
| public Class Implements org. Doc from org. Return the type of object that this FactoryBean creates,
or This allows one to check for specific types of beans without instantiating objects, for example on autowiring. In the case of implementations that are creating a singleton object, this method should try to avoid singleton creation as far as possible; it should rather estimate the type in advance. For prototypes, returning a meaningful type here is advisable too. This method can be called before this FactoryBean has been fully initialized. It must not rely on state created during initialization; of course, it can still use such state if available. Note Autowiring will simply ignore FactoryBeans that return
| |
| isSingleton | back to summary |
|---|---|
| public boolean isSingleton() Overrides default org. Doc from org. Is the object managed by this factory a singleton? That is,
will Note If a FactoryBean indicates to hold a singleton object,
the object returned from The singleton status of the FactoryBean itself will generally be provided by the owning BeanFactory; usually, it has to be defined as singleton there. Note This method returning The default implementation returns
| |
| setConversionService | back to summary |
|---|---|
| public void setConversionService(ConversionService conversionService) | |
| setHandlerAdapter | back to summary |
|---|---|
| public void setHandlerAdapter(RequestMappingHandlerAdapter handlerAdapter) | |