Since we're on a major migration process of this website, some component documents here are out of sync right now. In the meantime you may want to look at the asciidoc in the repository:

How do I use Spring Property Placeholder with Camel XML

We do NOT yet support the ${something} notation inside arbitrary Camel XML. For example at the time of writing this is NOT supported (due Spring limitations)


However you can use the <endpoint/> element to define endpoints which does support the property resolving which you can then refer to by name, using the Ref component as shown below (notice the ref: in the uri):


Camel does not yet fully support property placeholders as there is a limitation in Spring. See JIRA SPR-4466

Bridge Spring and Camel property placeholders

From Camel 2.10 onwards you can bridge Spring and Camel property placeholders, see Using PropertyPlaceholder for more details.

Here is a trick that you can use to define the uri in a property file using Spring injection and Camel endpoint :

From Camel 2.3 onwards there is a Properties component build in Camel core which allows you to use properties in the same way as Spring property placeholders, and even more.

© 2004-2015 The Apache Software Foundation.
Apache Camel, Camel, Apache, the Apache feather logo, and the Apache Camel project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
Graphic Design By Hiram