1

2 つの異なる XML を (FreeMarker によって) 2 つの異なるエンドポイントに送信する必要があります。すなわち

.to("freemarker:templates/xml1.ftl").to("file://C:\\testXmls1")

.to("freemarker:templates/xml2.ftl").to("file://C:\\testXmls2")

関数を見てみましたが、multicast().to が2つある場合の適用方法がわかりません

誰でも私を助けてもらえますか?

4

1 に答える 1

2

はい、同じ .to(uri1, uri2, ...) で複数のエンドポイントを指定すると、単一の「eip」になります。

multicast()
  .to(uri1a, uri1b)
  .to(uri2a, uri2b)
.end() // to end multicast

それ以外の場合は、パイプライン eip を使用してそれを囲む必要があります。

multicast()
  .pipeline().to(uri1a).to(uri1b).end() // to end this pipeline
  .pipeline().to(uri2a).to(uri2b).end() // to end this pipeline
.end() // to end multicast
于 2012-11-20T14:37:53.777 に答える