Versions Compared

Key

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

Properties Component

Available as of from Camel 2.3

URI format

Code Block
properties:key[?options]

Where key is the key for the property to lookupbe looked up.

Options

Div
classconfluenceTableSmall
To use a specific load the By String}}9 The token to indicate the end of a property token.

NameOption

Type

Default

Description

cache

boolean

true

Whether or not to cache loaded properties.

locations

String

null

A list of locations to load properties. You can use comma to separate multiple locations. This option will override any default locations and only use the locations from this option.

encoding

String

null

Camel 2.14.3/2.15.1:

The charset to

use when loading properties, such as UTF-8.

The default charset is: ISO-8859-1 (latin1).

fallbackToUnaugmentedProperty

boolean

true

Camel 2.9 If true, first attempt resolution of property name augmented with propertyPrefix and propertySuffix before falling back the plain property name specified.

If false, only the augmented property name is searched.

defaultFallbackEnabled

boolean

true

Camel 2.19: If false the component will not attempt to find a default for the key by looking after the colon separator

is used

.

ignoreMissingLocation

boolean

false

Camel 2.10: Whether to silently ignore if a location cannot be located, such as a properties file not found.

propertyPrefixlocations

String

null

A comma separated list of one or more locations of property files to be loaded. Property resolution will use the given property files exclusively. Any default location(s) are ignored.

prefixToken

String

{{

Camel 2.9 Optional prefix prepended to property names before resolution. This token is used to mark the start of a property placeholder definition.

propertyPrefixpropertySuffix

String

null

Camel 2.9 Optional suffix appended to property names before An optional prefix that's prepended to each property name prior to resolution.

fallbackToUnaugmentedPropertypropertySuffix

booleanString

truenull

Camel 2.9 If true, first attempt resolution of property name augmented with propertyPrefix and propertySuffix before falling back the plain property name specified. If false, only the augmented property name is searched. An optional suffix that's appended to each property name prior to resolution.

suffixToken

String

prefixToken

String

{{}}

Camel 2.9 The This token is used to indicate mark the beginning end of a property tokenplaceholder definition.suffixToken

systemPropertiesMode

int

2

Camel 2.

16 The mode to use for whether to resolve and use system properties:

0 = never - JVM system properties are never used.
1 = fallback - JVM system properties are only used as fallback if no regular property with the key exists.
2 = override - JVM system properties are used if exists, otherwise the regular property will be used.

Warning
titleBridging Spring and Camel Property Placeholders

When bridging to Spring's property placeholder using org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer the configuration on BridgePropertyPlaceholderConfigurer will take precedence over the configuration on the PropertiesComponent

Tip
titleResolving property from Java code

You can use the method resolvePropertyPlaceholders on the CamelContext to resolve a property from any Java code.

...

  • Jasypt for using encrypted values (eg passwords) in the propertiese.g., passwords, in properties.