Hi All,
I am trying to use properties in the uri part of
InterceptSendToEndpoint, but no luck.
Here is example code(I am using spring and Camel 2.4):
<bean id="properties"
class="org.apache.camel.component.properties.PropertiesComponent" />
<property name="locations" value="common.properties" />
</bean>
<camel: camelContext id="context">
...
<camel:intercaptSendToEndpoint uri="{{sendingURL}}">
<camel:log message="intercepted!" />
</camel:intercaptSendToEndpoint>
...
</camel:camelContext>
In the property file "common.properties", I have "sendingURL=
http://10.1.201.225/myService".
As you may have figured out, I wanted to intercept all messages that
are sent to an http endpoint(http://10.1.201.225/myService) and print
"intercepted!" in the log.
I have also tried to use uri="${properties:sendingURL}", but it
didn't work either.
However, when I replaced uri="{{sendingURL}}" with uri="
http://10.1.201.225/myService", it just worked.
Please correct me if I missed anything in the usage of properties
component and the intercepter.
When reading the camel document(
http://camel.apache.org/intercept.html), I found InterceptSendToEndpoint is
"dynamic" and supports wildcard and regular expression. Doesn't it support
properties?
Thank you very much.
Best
Yiming
--
View this message in context:
http://camel.465427.n5.nabble.com/is-that-possible-to-use-properties-in-the-uri-attribute-of-InterceptSendToEndpoint-tp3247537p3247537.html
Sent from the Camel - Users mailing list archive at Nabble.com.