This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push: new 6a1f1fb Regen 6a1f1fb is described below commit 6a1f1fb47a8434686ec2cd3b9d80f290b4dc79bc Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Wed Aug 7 22:06:21 2019 +0200 Regen --- .../src/main/docs/properties-component.adoc | 4 +- .../modules/ROOT/pages/properties-component.adoc | 45 ++++++---------------- 2 files changed, 14 insertions(+), 35 deletions(-) diff --git a/components/camel-properties/src/main/docs/properties-component.adoc b/components/camel-properties/src/main/docs/properties-component.adoc index 6dc94e0..6153b37 100644 --- a/components/camel-properties/src/main/docs/properties-component.adoc +++ b/components/camel-properties/src/main/docs/properties-component.adoc @@ -99,7 +99,7 @@ The component supports 13 options, which are listed below. | *camel.component.properties.default-fallback-enabled* | If false, the component does not attempt to find a default for the key by looking after the colon separator. | true | Boolean | *camel.component.properties.enabled* | Whether to enable auto configuration of the properties component. This is enabled by default. | | Boolean | *camel.component.properties.encoding* | Encoding to use when loading properties file from the file system or classpath. If no encoding has been set, then the properties files is loaded using ISO-8859-1 encoding (latin-1) as documented by java.util.Properties#load(java.io.InputStream) | | String -| *camel.component.properties.environment-variable-mode* | Sets the OS environment variables mode. The default mode (override) is to use OS environment variables if present, and override any existing properties. | 1 | Integer +| *camel.component.properties.environment-variable-mode* | Sets the OS environment variables mode (0 = never, 1 = fallback, 2 = override). The default mode (override) is to use OS environment variables if present, and override any existing properties. OS environment variable mode is checked before JVM system property mode | 2 | Integer | *camel.component.properties.ignore-missing-location* | Whether to silently ignore if a location cannot be located, such as a properties file not found. | false | Boolean | *camel.component.properties.initial-properties* | Sets initial properties which will be used before any locations are resolved. The option is a java.util.Properties type. | | String | *camel.component.properties.location* | 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. | | String @@ -107,7 +107,7 @@ The component supports 13 options, which are listed below. | *camel.component.properties.override-properties* | Sets a special list of override properties that take precedence and will use first, if a property exist. The option is a java.util.Properties type. | | String | *camel.component.properties.properties-parser* | To use a custom PropertiesParser. The option is a org.apache.camel.component.properties.PropertiesParser type. | | String | *camel.component.properties.resolve-property-placeholders* | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. | true | Boolean -| *camel.component.properties.system-properties-mode* | Sets the system property mode. The default mode (override) is to use system properties if present, and override any existing properties. | 2 | Integer +| *camel.component.properties.system-properties-mode* | Sets the JVM system property mode (0 = never, 1 = fallback, 2 = override). The default mode (override) is to use system properties if present, and override any existing properties. OS environment variable mode is checked before JVM system property mode | 2 | Integer |=== // spring-boot-auto-configure options: END diff --git a/docs/components/modules/ROOT/pages/properties-component.adoc b/docs/components/modules/ROOT/pages/properties-component.adoc index 127edca..6153b37 100644 --- a/docs/components/modules/ROOT/pages/properties-component.adoc +++ b/docs/components/modules/ROOT/pages/properties-component.adoc @@ -30,8 +30,8 @@ The Properties component supports 12 options, which are listed below. | *ignoreMissingLocation* (common) | Whether to silently ignore if a location cannot be located, such as a properties file not found. | false | boolean | *initialProperties* (advanced) | Sets initial properties which will be used before any locations are resolved. | | Properties | *overrideProperties* (advanced) | Sets a special list of override properties that take precedence and will use first, if a property exist. | | Properties -| *systemPropertiesMode* (common) | Sets the system property mode. The default mode (override) is to use system properties if present, and override any existing properties. | 2 | int -| *environmentVariableMode* (common) | Sets the OS environment variables mode. The default mode (override) is to use OS environment variables if present, and override any existing properties. | 1 | int +| *systemPropertiesMode* (common) | Sets the JVM system property mode (0 = never, 1 = fallback, 2 = override). The default mode (override) is to use system properties if present, and override any existing properties. OS environment variable mode is checked before JVM system property mode | 2 | int +| *environmentVariableMode* (common) | Sets the OS environment variables mode (0 = never, 1 = fallback, 2 = override). The default mode (override) is to use OS environment variables if present, and override any existing properties. OS environment variable mode is checked before JVM system property mode | 2 | int | *resolveProperty Placeholders* (advanced) | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. | true | boolean | *basicPropertyBinding* (advanced) | Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean |=== @@ -99,7 +99,7 @@ The component supports 13 options, which are listed below. | *camel.component.properties.default-fallback-enabled* | If false, the component does not attempt to find a default for the key by looking after the colon separator. | true | Boolean | *camel.component.properties.enabled* | Whether to enable auto configuration of the properties component. This is enabled by default. | | Boolean | *camel.component.properties.encoding* | Encoding to use when loading properties file from the file system or classpath. If no encoding has been set, then the properties files is loaded using ISO-8859-1 encoding (latin-1) as documented by java.util.Properties#load(java.io.InputStream) | | String -| *camel.component.properties.environment-variable-mode* | Sets the OS environment variables mode. The default mode (override) is to use OS environment variables if present, and override any existing properties. | 1 | Integer +| *camel.component.properties.environment-variable-mode* | Sets the OS environment variables mode (0 = never, 1 = fallback, 2 = override). The default mode (override) is to use OS environment variables if present, and override any existing properties. OS environment variable mode is checked before JVM system property mode | 2 | Integer | *camel.component.properties.ignore-missing-location* | Whether to silently ignore if a location cannot be located, such as a properties file not found. | false | Boolean | *camel.component.properties.initial-properties* | Sets initial properties which will be used before any locations are resolved. The option is a java.util.Properties type. | | String | *camel.component.properties.location* | 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. | | String @@ -107,7 +107,7 @@ The component supports 13 options, which are listed below. | *camel.component.properties.override-properties* | Sets a special list of override properties that take precedence and will use first, if a property exist. The option is a java.util.Properties type. | | String | *camel.component.properties.properties-parser* | To use a custom PropertiesParser. The option is a org.apache.camel.component.properties.PropertiesParser type. | | String | *camel.component.properties.resolve-property-placeholders* | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. | true | Boolean -| *camel.component.properties.system-properties-mode* | Sets the system property mode. The default mode (override) is to use system properties if present, and override any existing properties. | 2 | Integer +| *camel.component.properties.system-properties-mode* | Sets the JVM system property mode (0 = never, 1 = fallback, 2 = override). The default mode (override) is to use system properties if present, and override any existing properties. OS environment variable mode is checked before JVM system property mode | 2 | Integer |=== // spring-boot-auto-configure options: END @@ -118,8 +118,6 @@ You can use the method `resolvePropertyPlaceholders` on the == Using PropertyPlaceholder -*Available as of Camel 2.3* - Camel now provides a new `PropertiesComponent` in *camel-core* which allows you to use property placeholders when defining Camel Endpoint URIs. @@ -178,8 +176,6 @@ with comma such as: pc.setLocation("com/mycompany/myprop.properties,com/mycompany/other.properties"); ---- -*Available as of Camel 2.19.0* - You can set which location can be discarded if missing by by setting the ``optional`` attribute, which is false by default, i.e: [source,java] @@ -191,8 +187,6 @@ pc.setLocations( == Using system and environment variables in locations -*Available as of Camel 2.7* - The location now supports using placeholders for JVM system properties and OS environments variables. @@ -291,7 +285,6 @@ inside the Spring as well as the Blueprint XML. == Using a Properties from the Registry -*Available as of Camel 2.4* + For example in OSGi you may want to expose a service which returns the properties as a `java.util.Properties` object. @@ -418,19 +411,21 @@ the `<camelContext>` tag such as `trace` as shown here: The properties components supports using JVM system properties and also OS environment variables as values which can either be used as override or fallback values. -The default mode is that JVM system properties are in override mode, which means they -are checked first. +The default mode is that both of them are in override mode, and they are check in the following order: + +1. OS environment variable (override mode) +2. JVM system property (override mode) +3. Property files and other locations +4. OS environment variable (fallback mode) +5. JVM system property (fallback mode) -OS environment variables are in override mode as default mode, -which means that if a OS environment variable exists, then it will be used. +The check stops at first found property value for the key. You can control these modes using the `systemPropertiesMode` and `environmentVariableMode` options on the properties component. == Using property placeholders for any kind of attribute in the XML DSL -*Available as of Camel 2.7* - In the example below we use the `prop` prefix for the namespace `\http://camel.apache.org/schema/placeholder` by which we can use the `prop` prefix in the attributes in the XML DSLs. Notice how we use that @@ -447,8 +442,6 @@ stop=true == Using Blueprint property placeholder with Camel routes -*Available as of Camel 2.7* - Camel supports Blueprint which also offers a property placeholder service. Camel supports convention over configuration, so all you have to do is to define the @@ -552,8 +545,6 @@ Each location is separated by comma. == Overriding Blueprint property placeholders outside CamelContext -*Available as of Camel 2.10.4* - When using Blueprint property placeholder in the Blueprint XML file, you can declare the properties directly in the XML file as shown below: @@ -572,8 +563,6 @@ file. == Using .cfg or .properties file for Blueprint property placeholders -*Available as of Camel 2.10.4* - When using Blueprint property placeholder in the Blueprint XML file, you can declare the properties in a `.properties` or `.cfg` file. If you use Apache ServieMix / Karaf then this container has a convention that it @@ -620,8 +609,6 @@ destination=mock:result == Bridging Spring and Camel property placeholders -*Available as of Camel 2.10* - The Spring Framework does not allow 3rd party frameworks such as Apache Camel to seamless hook into the Spring property placeholder mechanism. However you can easily bridge Spring and Camel by declaring a Spring @@ -676,8 +663,6 @@ An alternative is to configure the `PropertyPlaceholderConfigurer` with == Overriding properties from Camel test kit -*Available as of Camel 2.10* - When Testing with Camel and using the xref:properties-component.adoc[Properties] component, you may want to be able to provide the properties to be used from directly within the unit test @@ -704,8 +689,6 @@ access to the location of the properties. == Using @PropertyInject -*Available as of Camel 2.12* - Camel allows to inject property placeholders in POJOs using the `@PropertyInject` annotation which can be set on fields and setter methods. @@ -755,8 +738,6 @@ private int timeout; == Using out of the box functions -*Available as of Camel 2.14.1* - The xref:properties-component.adoc[Properties] component includes the following functions out of the box @@ -852,8 +833,6 @@ example to call a service on localhost, maybe for unit testing etc == Using custom functions -*Available as of Camel 2.14.1* - The xref:properties-component.adoc[Properties] component allow to plugin 3rd party functions which can be used during parsing of the property placeholders. These functions are then able to do custom logic to resolve the