Apache camel 为什么camel路由中的bean参数是exchange的主体值?
我是骆驼队的首发队员。我有个问题。我有一条路线Apache camel 为什么camel路由中的bean参数是exchange的主体值?,apache-camel,Apache Camel,我是骆驼队的首发队员。我有个问题。我有一条路线 <route> <from uri="file:/test/inBox"/> <bean method="processingAuditInsert(*, 'RD', 'AA')" ref="fileAuditHandler"/> <bean method="processingAuditUpdate(*, 'IU')" ref="fileAuditHandler"/>
<route>
<from uri="file:/test/inBox"/>
<bean method="processingAuditInsert(*, 'RD', 'AA')" ref="fileAuditHandler"/>
<bean method="processingAuditUpdate(*, 'IU')" ref="fileAuditHandler"/>
<toD uri="file:/test/outBox"/>
<bean method="processingAuditUpdate(*, 'CO')" ref="fileAuditHandler"/>
</route>
如果您能在db表中提供FileAuditHandler的完整代码FileAuditHandler only acts insert和update,这将非常有用。我想知道为什么参数是body的值,而不是CO。
@Handler
public void processingAuditUpdate(Exchange ex, String status) {
if (status.equals("IU")) {
// Update Status 'IU'
} else (status.equals("CO")) {
// Update Status 'CO'
} else {
log.error("Update Status value is invalid!!!! ::::: {}", status);
}
}