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"/>
謝謝你,確切的問題。 –