Reputation: 3166
I have a Camel route defined in xml DSL with a <removeHeaders>
element where I specify a regex pattern e.g.<removeHeaders pattern="*"/>
(pattern is simplified for brevity). I want to move the pattern string out of the xml and into a properties file and read the string in via the PropertyPlaceholderConfigurer mechanism like <removeHeaders pattern="${removeHeadersPattern}"/>
since I use this same pattern string for multiple routes. However, the attribute value is being treated as a literal string instead of getting replaced. Is there a way to make this work? Maybe I'm just missing something?
Upvotes: 0
Views: 302
Reputation: 4490
See the documentation for using properties in Camel. As per my understanding, we use properties with
${property_name}
place holder if it is used outside camel context.{{property_name}}
within camel context.Also, note that, beginning from Camel 2.9 we have provision to change these place holders using prefixToken
and suffixToken
paramters while loading properties.
Upvotes: 2