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 |
---|
class | confluenceTableSmall |
---|
|
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: | To use a specific The charset to | load the use when loading properties, such as UTF-8 . | By 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. | propertyPrefix locations
| 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. | propertyPrefix propertySuffix
| 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. | fallbackToUnaugmentedProperty propertySuffix
| boolean String
| true null
| 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
| String int
| }}2
| Camel 2. | 9 The token to indicate the end of a property token.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 |
---|
title | Bridging 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 |
---|
title | Resolving 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.