0
我想用spring的unmarshaller自动将请求体从xml解组到一个对象。但我没有得到错误util
prfeix unbind。你能告诉我如何使用util:list
以及我在哪里可以找到util:list
的参考。我如何使用util:list在弹簧配置文件
我确实发现官方文档在</property
中省略了关闭>
,我在我的配置中更正了这一点。
我发现配置更令人沮丧,只是编写代码。
<bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter">
<property name="messageConverters">
<util:list id="beanList">
<ref bean="stringHttpMessageConverter"/>
<ref bean="marshallingHttpMessageConverter"/>
</util:list>
</property
</bean>
<bean id="stringHttpMessageConverter"
class="org.springframework.http.converter.StringHttpMessageConverter"/>
<bean id="marshallingHttpMessageConverter"
class="org.springframework.http.converter.xml.MarshallingHttpMessageConverter">
<property name="marshaller" ref="castorMarshaller" />
<property name="unmarshaller" ref="castorMarshaller" />
</bean>
<bean id="castorMarshaller" class="org.springframework.oxm.castor.CastorMarshaller"/>
谢谢你,确切的问题。 –