我如何写 Spring XML 关于多个输入

How can I write Spring XML about multiple inputs

我正在实施调解模块。 该系统向目标系统发送许多文件并添加一些信息。

有很多输入源和输出目标。 所以,我想为这个过程写SpringXML。但是我找不到这个解决方案。

我在 Jboss 社区看到了一些文章。

https://access.redhat.com/documentation/en-us/red_hat_jboss_fuse/6.3/html/apache_camel_development_guide/basicprinciples-multipleinputs

在本文中,java dsl 的定义如下。

from("URI1").to("DestinationUri");
from("URI2").to("DestinationUri");
from("URI3").to("DestinationUri");

这个代码在spring中可以吗XML? 请检查我的问题和回复解决方案。

谢谢。

每条路线只能有 1 个。不建议使用 2+。在 Camel 3 中,我们将其限制为仅 1 个输入。

因此每个输入使用 1 个路由。如果您想调用在这些路由之间共享的内容,您可以 link 通过 direct 将多个路由组合在一起

from a
  to direct:shared

from b
  to direct:shared

from direct:shared
  to foo