Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • lookup or creating endpoints
  • lookup of beans in the Registry
  • additional supported in Spring XML (see below in examples)
  • using Blueprint PropertyPlaceholder with Camel Properties component
  • using @PropertyInject to inject a property in a POJO
  • Camel 2.14.1 Using default value if a property does not exists

Syntax

The syntax to use Camel's property placeholder is to use {{key}} for example {{file.uri}} where file.uri is the property key.
You can use property placeholders in parts of the endpoint URI's which for example you can use placeholders for parameters in the URIs.

From Camel 2.14.1 onwards you can specify a default value to use if a property with the key does not exists, eg file.url:/some/path where the default value is the text after the colon (eg /some/path).

Info

Do not use colon in the property key. The colon is used as a separator token when you are providing a default value, which is supported from Camel 2.14.1 onwards.

PropertyResolver

Camel provides a pluggable mechanism which allows 3rd part to provide their own resolver to lookup properties. Camel provides a default implementation org.apache.camel.component.properties.DefaultPropertiesResolver which is capable of loading properties from the file system, classpath or Registry. You can prefix the locations with either:

...