我在驼峰路线中有以下内容,但它似乎没有得到标头值。这是正确的方法吗?
<to uri="ahc:http://${header.freeNasServerIp}:80/api/v1.0/storage/volume/"/>
答案 0 :(得分:1)
请参阅此有关动态的常见问题解答: http://camel.apache.org/how-to-use-a-dynamic-uri-in-to.html
请参阅此链接How can I invoke a RESTful service through Apache Camel?
具体回答这个问题是:
<recipientList>
<simple>ahc:http://${header.freeNasServerIp}:80/api/v1.0/storage/volume/</simple>
</recipientList>