How do I use Spring Property Placeholder with Camel XML
We don't yet support the
notation inside arbitrary Camel XML. For example at the time of writing this is not supported
<beans xmlns="http:
xmlns:xsi="http:
xsi:schemaLocation="
http: http: ">
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
<camelContext xmlns="http:>
<route>
<from ref="activemq:${someQueueName}"/>
<to uri="mock:results"/>
</route>
</camelContext>
</beans>
However you can use the <endpoint/> element to define endpoints which does support the property resolving which you can then refer to by name or reference in XML or Java code.
<beans xmlns="http:
xmlns:xsi="http:
xsi:schemaLocation="
http: http: ">
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
<camelContext xmlns="http:>
<endpoint id="input1" uri="activemq:${someQueueName}"/>
<route>
<from ref="input1"/>
<to uri="activemq:OutputQueue"/>
</route>
</camelContext>
</beans>