Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.此内容没有您所选择的语言版本。
Chapter 91. Properties
Properties Component 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
Available as of Apache Camel 2.3
URI format 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
properties:key[?options]
properties:key[?options]
Where key is the key for the property to lookup
Options 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
Name | 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. |
ignoreMissingLocation
|
boolean
|
false
|
*Camel 2.10:* Whether to silently ignore if a location cannot be located, such as a properties file not found. |
propertyPrefix
|
String
|
null
|
*Camel 2.9* Optional prefix prepended to property names before resolution. |
propertySuffix
|
String
|
null
|
*Camel 2.9* Optional suffix appended to property names before resolution. |
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.
|
prefixToken
|
String
|
{{ | *Camel 2.9* The token to indicate the beginning of a property token. |
suffixToken
|
String
|
}} | *Camel 2.9* The token to indicate the end of a property token. |
Resolving property from Java code
You can use the method
resolvePropertyPlaceholders
on the CamelContext
to resolve a property from any Java code.
See also 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
- Jasypt for using encrypted values (for example, passwords) in the properties