Support HttpMessageConverter refs in mvc namespace

Issue: SPR-9469
This commit is contained in:
Rossen Stoyanchev
2012-11-13 21:47:59 -05:00
parent 62f2858f7f
commit ecce7520fb
3 changed files with 26 additions and 15 deletions

View File

@@ -2,14 +2,17 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd">
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd">
<mvc:annotation-driven>
<mvc:message-converters register-defaults="false">
<bean class="org.springframework.http.converter.StringHttpMessageConverter"/>
<bean class="org.springframework.http.converter.ResourceHttpMessageConverter"/>
<ref bean="stringConverter" />
<ref bean="resourceConverter" />
</mvc:message-converters>
</mvc:annotation-driven>
<bean id="stringConverter" class="org.springframework.http.converter.StringHttpMessageConverter"/>
<bean id="resourceConverter" class="org.springframework.http.converter.ResourceHttpMessageConverter"/>
</beans>