在Apache-Camel Uri中的简单表达 [英] Simple Expression in apache-camel uri
本文介绍了在Apache-Camel Uri中的简单表达的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是apache-camel的新手,知道我遇到了问题. 我想在uri定义中使用简单的表达式,但是我不知道怎么做.
I'm new to apache-camel and know i met a problem. I want to use simple expressions in my uri definition, but i don't know how.
例如:
from("foo://bar").to("foo://bar?var=${header.varName}");
有没有办法使用这样的表达方式?
Is there a way to use such expressions?
推荐答案
Bernhard
http://camel.apache. org/how-do-i-use-dynamic-uri-in-to.html
使用收件人列表EIP模式,该模式允许您使用表达式来计算动态URI. 例如,使用如下所示的简单表达语言:
Use the Recipient List EIP pattern, which allows you to compute the dynamic URI using an Expression. For example using the Simple expression language as shown below:
recipientList(simple("freemarker://templateHome/${body.templateName}.ftl"))
这篇关于在Apache-Camel Uri中的简单表达的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文