Apache camel ApacheCamel-如何将查询参数传递到velocity模板

Apache camel ApacheCamel-如何将查询参数传递到velocity模板,apache-camel,velocity,http-request-parameters,Apache Camel,Velocity,Http Request Parameters,我在SpringDSL中描述了驼峰(2.16.4)路由,如下所示 ... <from uri="restlet:http://localhost:8081/service_url?restletMethod=get"/> <to uri="velocity:{{templates.uri}}/stub-answer.vm{{velocity.opts}}"/> ... 但这是一个ducktape,我相信有更直接的forvard方法按名称获取请求参数(可能使用xml中的一

我在SpringDSL中描述了驼峰(2.16.4)路由,如下所示

...
<from uri="restlet:http://localhost:8081/service_url?restletMethod=get"/>
<to uri="velocity:{{templates.uri}}/stub-answer.vm{{velocity.opts}}"/>
...
但这是一个ducktape,我相信有更直接的forvard方法按名称获取请求参数(可能使用xml中的一些路由配置)


TIA。

我目前正在考虑编写定制处理器,并将其打包到jar中,然后打包到OSGI包中,并以这种方式在camel route中使用它。
…我对处理器的尝试:)-
#set($splittedParams = $headers.CamelHttpQuery.split("\/"))
#set($splittedParamsSize = $splittedParams.size())
#set($param2Index = $splittedParamsSize - 1)
#set($param2 = $splittedParams[$param2Index])