Apache Camel escapes double curly braces… here is a solution to the problem.
Apache Camel escapes double curly braces
I’m using Apache Camel, and I have an endpoint that contains double curly braces.
For example: " endpoint {{ valueToBeOverriden }}".
When I call the following statement, it throws ResolveEndpointFailedException.
camelContext.getEndpoint(" endpoint {{ valueToBeOverriden }}")
I noticed that the problem is double curly braces: {{.
How can I escape them?
Do you have any ideas?
Thank you
Louisa
Solution
Did you create PropertiesComponent for Camel contexts?
For example:
Configure the PropertiesComponent in Spring XML
<camelContext ... >
<propertyPlaceholder id="properties" location="com/mycompany/myprop.properties"/>
</camelContext>
You can access http://camel.apache.org/using-propertyplaceholder.html Get more information.