【发布时间】:2016-11-23 05:24:11
【问题描述】:
在下面的场景中,我有一个编组器选择一个对象并针对 xsd 进行验证。我需要将此 Request 对象映射到一个编组器中的多个 xsd。
<bean id="jaxbMarshallerForCOTRequestObject" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
<property name="classesToBeBound">
<list>
<value>com.fidintl.retail.myProject.model.th.Request</value>
</list>
</property>
<property name="schema" value="classpath:internal/test1.xsd"></property>
<property name="validationEventHandler" ref="ceFeedXmlValidationEventHandlerService"></property>
<property name="marshallerProperties">
<map>
<entry key="jaxb.encoding">
<value>ISO-8859-1</value>
</entry>
</map>
</property>
</bean>
有人可以提供方法吗?
我尝试使用<schemas> 标签,但它对我不起作用。
【问题讨论】:
标签: java xml spring spring-integration