Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/326.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何使用aggregationStrategy和动态URI?_Java_Apache Camel - Fatal编程技术网

Java 如何使用aggregationStrategy和动态URI?

Java 如何使用aggregationStrategy和动态URI?,java,apache-camel,Java,Apache Camel,我想使用一个带有动态URI的enricher。我使用Camel 2.17.5。因为2.16,所以可以使用它。但是如何使用聚合策略和动态URI呢 Documantation说: .enrich().simple("http:myserver/${header.orderId}/order") 但这不起作用: .enrich(new StrategyEnrich()).simple("http:myserver/${header.orderId}/order") 这也不是: .enrich(si

我想使用一个带有动态URI的enricher。我使用Camel 2.17.5。因为2.16,所以可以使用它。但是如何使用聚合策略和动态URI呢

Documantation说:

.enrich().simple("http:myserver/${header.orderId}/order")
但这不起作用:

.enrich(new StrategyEnrich()).simple("http:myserver/${header.orderId}/order")
这也不是:

.enrich(simple("http:myserver/${header.orderId}/order"),new StrategyEnrich())
有人知道正确的语法吗

谢谢

我找到了解决方案:

.enrich()
    .simple("http:myserver/${header.orderId}/order")
    .aggregationStrategy(new StrategyEnrich())