Detect custom ContentNegotiationViewResolver

The <mvc:annotation-driven> element now adds an alias when a
ContentNegotiationManager bean is registered with a custom name.
This helps <mvc:view-resolvers> to more reliably find such a custom
ContentNegotiationManager.

Issue: SPR-13559
This commit is contained in:
Rossen Stoyanchev
2015-10-29 18:01:00 -04:00
parent 3e807c297d
commit f84a0c914a
5 changed files with 31 additions and 10 deletions

View File

@@ -9,6 +9,10 @@
<mvc:annotation-driven content-negotiation-manager="contentNegotiationManager" />
<mvc:view-resolvers>
<mvc:content-negotiation/>
</mvc:view-resolvers>
<bean id="contentNegotiationManager" class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean">
<property name="mediaTypes">
<value>