apache-camel uri 中的简单表达式 [英] Simple Expression in apache-camel uri

查看:20
本文介绍了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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆