2
我想配置Jaxb2Marshaller
象下面這樣:Jaxb2Marshaller的classesToBeBound財產
<bean id="jaxbMarshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
<property name="classesToBeBound">
<list>
<value>com.test.response1.ResponseType1</value>
<value>com.test.response2.ResponseType2</value>
<value>com.test.request.Request</value>
</list>
</property>
</bean>
和它的作品。
混淆是劑量在classesToBound
事項中提到的類的順序?
如果我將其更改爲:
<bean id="jaxbMarshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
<property name="classesToBeBound">
<list>
<value>com.test.request.Request</value>
<value>com.test.response1.ResponseType1</value>
<value>com.test.response2.ResponseType2</value>
</list>
</property>
</bean>
隨着一切我得到以下異常如出一轍:
org.springframework.beans.TypeMismatchException: Failed to convert value of type 'com.test.response2.ResponseType2' to required type 'com.test.request.Request'
的spring
正在使用的版本是:3.1.2.RELEASE
人幫幫我 ?