1
我想这个例子中的ActiveMQ消息被转换在名为CustInfo使用推土机组件的Java对象中学习骆驼上保险丝 - :从ActiveMQ的为Java Bean
<camelContext id="context-43faded0-825e-454b-8037-c72122aa0418" xmlns="http://camel.apache.org/schema/blueprint">
<propertyPlaceholder location="classpath:sql.properties" id="properties"/>
<endpoint uri="dozer:toCustInfo?sourceModel=homeloancust.CustInfo&targetModel=org.blogdemo.homeloan.model.CustInfo&unmarshalId=homeloancust&mappingFile=toCustInfo.xml" id="toCustInfo"/>
<dataFormats>
<jaxb contextPath="homeloancust" id="homeloancust"/>
</dataFormats>
<route id="CustomerEvaluation">
<from uri="activemq:queue:customer"/>
<to ref="CustInfo" id="to3"/>
. . . .
</route>
</camelContext>
我的问题是,万一我不需要在Java对象中进行转换,我可以直接将消息转换为Java类(没有推土机)。 试用版本:
<bean id="CustInfo" class="homeloancust.CustInfo"/>
. . .
<to ref="CustInfo" id="to3"/>
没有成功!任何帮助?
感谢您的帮助! – Carla
这是我的荣幸。 –