如何使用 Apache Camel 在 XML 属性中使用 header 值?
How to use a header value inside an XML attribute using Apache Camel?
我在骆驼路线中有以下内容,但它似乎没有获得 header 值。这是正确的做法吗?
<to uri="ahc:http://${header.freeNasServerIp}:80/api/v1.0/storage/volume/"/>
请参阅有关动态的常见问题解答:
http://camel.apache.org/how-to-use-a-dynamic-uri-in-to.html
看到这个linkHow can I invoke a RESTful service through Apache Camel?
这个问题的具体答案是:
<recipientList>
<simple>ahc:http://${header.freeNasServerIp}:80/api/v1.0/storage/volume/</simple>
</recipientList>
我在骆驼路线中有以下内容,但它似乎没有获得 header 值。这是正确的做法吗?
<to uri="ahc:http://${header.freeNasServerIp}:80/api/v1.0/storage/volume/"/>
请参阅有关动态的常见问题解答: http://camel.apache.org/how-to-use-a-dynamic-uri-in-to.html
看到这个linkHow can I invoke a RESTful service through Apache Camel?
这个问题的具体答案是:
<recipientList>
<simple>ahc:http://${header.freeNasServerIp}:80/api/v1.0/storage/volume/</simple>
</recipientList>