Class ViewResolversBeanDefinitionParser
java.lang.Object
org.springframework.web.servlet.config.ViewResolversBeanDefinitionParser
- All Implemented Interfaces:
- BeanDefinitionParser
Parses the 
view-resolvers MVC namespace element and registers
 ViewResolver bean definitions.
 All registered resolvers are wrapped in a single (composite) ViewResolver with its order property set to 0 so that other external resolvers may be ordered before or after it.
When content negotiation is enabled the order property is set to highest priority instead with the ContentNegotiatingViewResolver encapsulating all other registered view resolver instances. That way the resolvers registered through the MVC namespace form a self-encapsulated resolver chain.
- Since:
- 4.1
- Author:
- Sivaprasad Valluru, Sebastien Deleuze, Rossen Stoyanchev
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringThe bean name used for theViewResolverComposite.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionparse(Element element, ParserContext context) Parse the specifiedElementand register the resultingBeanDefinition(s)with theBeanDefinitionRegistryembedded in the suppliedParserContext.
- 
Field Details- 
VIEW_RESOLVER_BEAN_NAMEThe bean name used for theViewResolverComposite.- See Also:
 
 
- 
- 
Constructor Details- 
ViewResolversBeanDefinitionParserpublic ViewResolversBeanDefinitionParser()
 
- 
- 
Method Details- 
parseDescription copied from interface:BeanDefinitionParserParse the specifiedElementand register the resultingBeanDefinition(s)with theBeanDefinitionRegistryembedded in the suppliedParserContext.Implementations must return the primary BeanDefinitionthat results from the parse if they will ever be used in a nested fashion (for example as an inner tag in a<property/>tag). Implementations may returnnullif they will not be used in a nested fashion.- Specified by:
- parsein interface- BeanDefinitionParser
- Parameters:
- element- the element that is to be parsed into one or more- BeanDefinitions
- context- the object encapsulating the current state of the parsing process; provides access to a- BeanDefinitionRegistry
- Returns:
- the primary BeanDefinition
 
 
-