【问题标题】:Camel: dynamic rest uri path with EL in DSL not possible?骆驼:DSL中带有EL的动态rest uri路径不可能?
【发布时间】:2016-11-03 16:53:34
【问题描述】:

我是骆驼的新手,并将它用于由 Spring DSL 和骆驼 servlet 配置的 http 路由。不幸的是,这样的“到”路由不起作用:

<to uri="https://host/path/${headers.pname1}/2016/11?bridgeEndpoint=true"/>

其中 ${headers.pname1} 是来自 servlet 上的 http 输入的 http 查询字符串参数。

如何在uri路径中使用表达式语言?

【问题讨论】:

标签: http apache-camel url-routing el dsl


【解决方案1】:

根据克劳斯·易卜生的评论,

使用额外的标签“toD”而不是“to”:

<toD uri="https://host/path/${headers.pname1}/2016/11?bridgeEndpoint=true"/>

可能出于性能原因,他们制作了第二个标签。

【讨论】:

    猜你喜欢
    • 2018-02-17
    • 2011-06-17
    • 2016-10-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-06-29
    • 1970-01-01
    相关资源
    最近更新 更多