You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2021/08/18 15:28:43 UTC

[camel] branch main updated (e38784b -> c60fb6370)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from e38784b  (chores) camel-kubernetes: code cleanup (#5961)
     new b6c4d61  Polish and cleanup documentation
     new 177c25f  Polish and cleanup documentation
     new 66bd70d  Polish and cleanup documentation
     new c60fb6370 Polish and cleanup documentation

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../camel/catalog/docs/properties-component.adoc   |  820 ++------------
 .../java/org/apache/camel/ConsumerTemplate.java    |   13 +-
 .../src/main/docs/properties-component.adoc        |  820 ++------------
 .../modules/ROOT/pages/properties-component.adoc   |  820 ++------------
 docs/user-manual/modules/ROOT/nav.adoc             |    4 +-
 .../modules/ROOT/pages/bean-integration.adoc       |   50 +-
 .../modules/ROOT/pages/consumertemplate.adoc       |   51 +
 .../modules/ROOT/pages/producertemplate.adoc       |    4 +
 .../ROOT/pages/using-propertyplaceholder.adoc      | 1135 ++++++--------------
 docs/user-manual/modules/faq/nav.adoc              |    1 -
 ...spring-property-placeholder-with-camel-xml.adoc |   77 --
 docs/user-manual/modules/faq/pages/index.adoc      |    1 -
 12 files changed, 757 insertions(+), 3039 deletions(-)
 create mode 100644 docs/user-manual/modules/ROOT/pages/consumertemplate.adoc
 delete mode 100644 docs/user-manual/modules/faq/pages/how-do-i-use-spring-property-placeholder-with-camel-xml.adoc

[camel] 02/04: Polish and cleanup documentation

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 177c25f36b9d5f3eeb8f324e19ccdc29431be3db
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Aug 18 14:06:48 2021 +0200

    Polish and cleanup documentation
---
 .../ROOT/pages/using-propertyplaceholder.adoc      | 39 +++++++++++++---------
 1 file changed, 24 insertions(+), 15 deletions(-)

diff --git a/docs/user-manual/modules/ROOT/pages/using-propertyplaceholder.adoc b/docs/user-manual/modules/ROOT/pages/using-propertyplaceholder.adoc
index 5ddff63..9957100 100644
--- a/docs/user-manual/modules/ROOT/pages/using-propertyplaceholder.adoc
+++ b/docs/user-manual/modules/ROOT/pages/using-propertyplaceholder.adoc
@@ -229,6 +229,8 @@ xref:producertemplate.adoc[ProducerTemplate] for example:
 template.sendBody("{{cool.start}}", "Hello World");
 ----
 
+=== Using property placeholders with consumer template
+
 This can also be done when using xref:consumertemplate.adoc[ConsumerTemplate], such as:
 
 [source,java]
@@ -236,36 +238,43 @@ This can also be done when using xref:consumertemplate.adoc[ConsumerTemplate], s
 Object body = template.receiveBody("{{cool.start}}");
 ----
 
-
-
-[[UsingPropertyPlaceholder-Examplewithlanguage]]
-== Example with xref:components:languages:simple-language.adoc[Simple] language
+== Using property placeholders with simple language
 
 The xref:components:languages:simple-language.adoc[Simple] language now also support using property
 placeholders, for example in the route below:
 
+[source,properties]
+----
+cheese.quote = Camel rocks
+----
+
+And in the route you can use the placeholder with the usual syntax `{{key}}` as shown:
 
 [source,java]
 ----
-// properties
-cheese.quote=Camel rocks
+from("direct:start")
+  .transform().simple("Hi ${body} do you think {{cheese.quote}}?");
+----
 
-// route from("direct:start")
-    .transform().simple("Hi ${body} do you think ${properties:cheese.quote}?");
+What happens is that Camel will resolve the placeholder during initialization of the route,
+so the route becomes:
+
+[source,java]
+----
+from("direct:start")
+  .transform().simple("Hi ${body} do you think Camel rocks?");
 ----
 
-You can also specify the location in the xref:components:languages:simple-language.adoc[Simple]
-language for example:
+So the simple language would not have any property placeholders anymore.
+This is the most common way.
 
+However, if the placeholder must be resolved by simple language itself,
+then you can use its `${properties}` function:
 
 [source,java]
 ----
-// bar.properties
-bar.quote=Beer tastes good
-
-// route
 from("direct:start")
-    .transform().simple("Hi ${body}. ${properties:com/mycompany/bar.properties:bar.quote}.");
+  .transform().simple("Hi ${body} do you think ${properties:cheese.quote}?");
 ----
 
 

[camel] 04/04: Polish and cleanup documentation

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit c60fb63702d3c315f3baa0472f36b637bc32a527
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Aug 18 16:57:40 2021 +0200

    Polish and cleanup documentation
---
 .../modules/ROOT/pages/bean-integration.adoc       |  50 +-
 .../ROOT/pages/using-propertyplaceholder.adoc      | 795 +++++----------------
 2 files changed, 227 insertions(+), 618 deletions(-)

diff --git a/docs/user-manual/modules/ROOT/pages/bean-integration.adoc b/docs/user-manual/modules/ROOT/pages/bean-integration.adoc
index 1fe440b..17495ff 100644
--- a/docs/user-manual/modules/ROOT/pages/bean-integration.adoc
+++ b/docs/user-manual/modules/ROOT/pages/bean-integration.adoc
@@ -3,11 +3,10 @@
 
 Camel supports the integration of beans and POJOs in a number of ways.
 
-[[BeanIntegration-Annotations]]
 == Annotations
 
 If a bean is defined in Spring XML or scanned using
-the Spring component scanning mechanism and a *<camelContext>* is used
+the Spring component scanning mechanism, and a *<camelContext>* is used
 or a `CamelBeanPostProcessor` then we process a number of Camel
 annotations to do various things such as injecting resources or
 producing, consuming or routing messages.
@@ -48,9 +47,48 @@ See more details at:
 See the https://github.com/apache/camel-examples/tree/master/examples/camel-example-pojo-messaging[POJO Messaging Example]
 for how to use the annotations for routing and messaging.
 
-[[BeanIntegration-BeanComponent]]
-== Bean Component
+== Using @PropertyInject
 
-The xref:components::bean-component.adoc[Bean] component allows one to invoke a particular
-method.
+Camel allows to inject property placeholders in POJOs using
+the `@PropertyInject` annotation which can be set on fields and setter
+methods. For example you can use that with `RouteBuilder` classes,
+such as shown below:
 
+[source,java]
+----
+public class MyRouteBuilder extends RouteBuilder {
+
+    @PropertyInject("hello")
+    private String greeting;
+
+    @Override
+    public void configure() throws Exception {
+        from("direct:start")
+            .transform().constant(greeting)
+            .to("{{result}}");
+    }
+}
+----
+
+Notice we have annotated the greeting field with `@PropertyInject` and
+define it to use the key `hello`. Camel will then lookup the property
+with this key and inject its value, converted to a String type.
+
+You can also use multiple placeholders and text in the key, for example
+we can do:
+
+[source,java]
+----
+@PropertyInject("Hello {{name}} how are you?")
+private String greeting;
+----
+
+This will lookup the placeholder with they key `name`.
+
+You can also add a default value if the key does not exists, such as:
+
+[source,java]
+----
+@PropertyInject(value = "myTimeout", defaultValue = "5000")
+private int timeout;
+----
diff --git a/docs/user-manual/modules/ROOT/pages/using-propertyplaceholder.adoc b/docs/user-manual/modules/ROOT/pages/using-propertyplaceholder.adoc
index 9957100..30b35c9 100644
--- a/docs/user-manual/modules/ROOT/pages/using-propertyplaceholder.adoc
+++ b/docs/user-manual/modules/ROOT/pages/using-propertyplaceholder.adoc
@@ -20,40 +20,6 @@ See the xref:components::properties-component.adoc[Properties] documentation for
 to configure Camel to known from which location(a) to load properties.
 
 
-[TIP]
-**Resolving property from Java code** +
-You can use the method `resolveProperty` on the `PropertiesComponent` to resolve a single property from Java code.
-Or use the method `resolvePropertyPlaceholders` on the `CamelContext` to resolve (one or more) property placeholder(s) from a string that.
-
-
-
-
-
-
-== Bridging Spring and Camel Property Placeholders
-TODO: Remove or move to legacy camel with spring xml files
-
-From *Camel 2.10*: Spring's property placeholder can be bridged with
-Camel's. See below for more details.
-
-The property placeholder is typically used when trying to do any of the
-following:
-
-* Lookup or creating endpoints
-* Lookup of beans in the xref:registry.adoc[Registry]
-* Additional supported in Spring XML (see below in examples)
-* Using Blueprint `PropertyPlaceholder` with Camel
-xref:components::properties-component.adoc[Properties] component
-* Using `@PropertyInject` to inject a property in a POJO
-* *Camel 2.14.1* Using default value if a property does not exists
-* *Camel 2.14.1* Include out of the box functions, to lookup property
-values from OS environment variables, JVM system properties, or the
-service idiom
-* *Camel 2.14.1* Using custom functions, which can be plugged into the
-property component
-* *Camel 3.9* Marking a property as optional, meaning that a property is not set if the property key does not exists
-
-
 == Property placeholder syntax
 
 The value of a Camel property can be obtained by specifying its key name
@@ -113,6 +79,28 @@ file:foo
 Then the option `bufferSize` is not in specified at all, and this would allow Camel to
 use the standard default value for `bufferSize` if any exists.
 
+=== Reverse a boolean value
+
+If a property placeholder is a boolean value, then it is possible to negate (reverse) the value by using `!` as prefix in the key.
+
+[source,properties]
+----
+integration.ftpEnabled=true
+----
+
+[source,java]
+----
+from("ftp:....").autoStartup("{{integration.ftpEnabled}}")
+    .to("kafka:cheese")
+
+from("jms:....").autoStartup("{{!integration.ftpEnabled}}")
+    .to("kafka:cheese")
+----
+
+In the example above then the FTP route or the JMS route should only be started. So if the FTP is enabled then JMS should be disable, and vise-versa.
+We can do this be negating the `autoStartup` in the JMS route, by using `!integration.ftpEnabled` as the key.
+
+
 == Example using property placeholders
 
 When using property placeholders in the endpoint URIs you should use this with the syntax `{{key}}` as shown in this example:
@@ -238,7 +226,7 @@ This can also be done when using xref:consumertemplate.adoc[ConsumerTemplate], s
 Object body = template.receiveBody("{{cool.start}}");
 ----
 
-== Using property placeholders with simple language
+== Using property placeholders with Simple language
 
 The xref:components:languages:simple-language.adoc[Simple] language now also support using property
 placeholders, for example in the route below:
@@ -277,416 +265,129 @@ from("direct:start")
   .transform().simple("Hi ${body} do you think ${properties:cheese.quote}?");
 ----
 
+== Resolving property placeholders from Java code
 
+If you need to resolve property placeholder(s) from some Java code, then Camel has two APIs for this:
 
-[[UsingPropertyPlaceholder-UsingPropertyPlaceholdersforAnyKindofAttributeintheXMLDSL]]
-== Using Property Placeholders for Any Kind of Attribute in the XML DSL
-
-*Since Camel 2.7*
-
-If you use OSGi Blueprint then this only works from *2.11.1* or *2.10.5*
-on.
-
-Previously it was only the `xs:string` type attributes in the XML DSL
-that support placeholders. For example often a timeout attribute would
-be a `xs:int` type and thus you cannot set a string value as the
-placeholder key. This is now possible from Camel 2.7 on using a special
-placeholder namespace.
-
-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 in the xref:{eip-vc}:eips:multicast-eip.adoc[Multicast] to indicate that the option
-`stopOnException` should be the value of the placeholder with the key
-`stop`.
-
-[source,xml]
-----
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:prop="http://camel.apache.org/schema/placeholder"
-       xsi:schemaLocation="
-           http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-           http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-    <!-- Notice in the declaration above, we have defined the prop prefix as the Camel placeholder namespace -->
-    <bean id="damn" class="java.lang.IllegalArgumentException">
-        <constructor-arg index="0" value="Damn"/>
-    </bean>
-    <camelContext xmlns="http://camel.apache.org/schema/spring">
-        <propertyPlaceholder id="properties" location="classpath:org/apache/camel/component/properties/myprop.properties"
-                             xmlns="http://camel.apache.org/schema/spring"/>
-        <route>
-            <from uri="direct:start"/>
-            <!-- use prop namespace, to define a property placeholder, which maps to option stopOnException={{stop}} -->
-            <multicast prop:stopOnException="stop">
-            <to uri="mock:a"/>
-            <throwException ref="damn"/>
-            <to uri="mock:b"/>
-            </multicast>
-        </route>
-    </camelContext>
-</beans>
-----
-
-In our properties file we have the value defined as:
-....
-stop=true
-....
-
-
-[[UsingPropertyPlaceholder-UsingPropertyPlaceholderintheJavaDSL]]
-== Using Property Placeholder in the Java DSL
-
-*Since Camel 2.7*
+- You can use the method `resolveProperty` on the `PropertiesComponent` to resolve a single property from Java code.
+- Use the method `resolvePropertyPlaceholders` on the `CamelContext` to resolve (one or more) property placeholder(s) in a String.
 
-Likewise we have added support for defining placeholders in the Java DSL
-using the new `placeholder` DSL as shown in the following equivalent
-example:
+For example to resolve a placeholder with key foo, you can do:
 
 [source,java]
 ----
-from("direct:start")
-    // use a property placeholder for the option stopOnException on the Multicast EIP
-    // which should have the value of {{stop}} key being looked up in the properties file
-    .multicast()
-    .placeholder("stopOnException", "stop")
-    .to("mock:a")
-    .throwException(new IllegalAccessException("Damn"))
-    .to("mock:b");
-----
-
-
-[[UsingPropertyPlaceholder-UsingBlueprintPropertyPlaceholderwithCamelRoutes]]
-== Using Blueprint Property Placeholder with Camel Routes
-
-*Since Camel 2.7*
-
-Camel supports xref:using-osgi-blueprint-with-camel.adoc[Blueprint]
-which also offers a property placeholder service. Camel supports
-convention over configuration, so all you have to do is to define the
-OSGi Blueprint property placeholder in the XML file as shown below:
-
-[source,xml]
-----
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
-           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
-           xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
-    <!-- OSGI blueprint property placeholder -->
-    <cm:property-placeholder id="myblueprint.placeholder" persistent-id="camel.blueprint">
-        <!-- list some properties as needed -->
-        <cm:default-properties>
-            <cm:property name="result" value="mock:result"/>
-        </cm:default-properties>
-    </cm:property-placeholder>
-    <camelContext xmlns="http://camel.apache.org/schema/blueprint">
-        <!-- in the route we can use {{ }} placeholders which will lookup in blueprint as Camel
-             will auto detect the OSGi blueprint property placeholder and use it -->
-        <route>
-            <from uri="direct:start"/>
-            <to uri="mock:foo"/>
-            <to uri="{{result}}"/>
-        </route>
-    </camelContext>
-</blueprint>
+Optional<String> prop = camelContext.getPropertiesComponent().resolveProperty("foo");
+if (prop.isPresent()) {
+    String value = prop.get();
+    ....
+}
 ----
 
-By default Camel detects and uses OSGi blueprint property placeholder
-service. You can disable this by setting the attribute
-`useBlueprintPropertyResolver` to false on the `<camelContext>`
-definition.
-
-=== About placeholder syntax
-
-Notice how we can use the Camel syntax for placeholders `{{ }}` in the
-Camel route, which will lookup the value from OSGi blueprint.
-The blueprint syntax for placeholders is `${}`. So outside
-the `<camelContext>` you must use the `${}` syntax. Where as
-inside `<camelContext>` you must use `{{ }}` syntax. OSGi blueprint
-allows you to configure the syntax, so you can actually align those if
-you want.
-
-You can also explicit refer to a specific OSGi blueprint property
-placeholder by its id. For that you need to use the
-Camel's `<propertyPlaceholder>` as shown in the example below:
-
-[source,xml]
-----
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
-           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
-           xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
-    <!-- OSGI blueprint property placeholder -->
-    <cm:property-placeholder id="myblueprint.placeholder" persistent-id="camel.blueprint">
-        <!-- list some properties as needed -->
-        <cm:default-properties>
-            <cm:property name="prefix.result" value="mock:result"/>
-        </cm:default-properties>
-    </cm:property-placeholder>
-    <camelContext xmlns="http://camel.apache.org/schema/blueprint">
-        <!-- using Camel properties component and refer to the blueprint property placeholder by its id -->
-        <propertyPlaceholder id="properties" location="blueprint:myblueprint.placeholder"
-                             prefixToken="[[" suffixToken="]]" propertyPrefix="prefix."/>
-        <!-- in the route we can use {{ }} placeholders which will lookup in blueprint -->
-        <route>
-            <from uri="direct:start"/>
-            <to uri="mock:foo"/>
-            <to uri="[[result]]"/>
-        </route>
-    </camelContext>
-</blueprint>
-----
+This API is to lookup a single property and returns a `java.util.Optional` type.
 
-Notice how we use the `blueprint` scheme to refer to the OSGi
-blueprint placeholder by its id. This allows you to mix and match, for
-example you can also have additional schemes in the location. For
-example to load a file from the classpath you can do:
+The `CamelContext` have another API which is capable of resolving multiple placeholders, and interpolate placeholders from an input String.
+Lets try with an example to explain this:
 
 [source,java]
 ----
-location="blueprint:myblueprint.placeholder,classpath:myproperties.properties"
+String msg = camelContext.resolvePropertyPlaceholders("{{greeting}} Camel user, Camel is {{cool}} dont you think?");
 ----
 
-Each location is separated by comma.
+The input string is a text statement which have two placeholders that will be resolved, for example:
 
-[[UsingPropertyPlaceholder-OverridingBlueprintPropertyPlaceholdersOutsideCamelContext]]
-== Overriding Blueprint Property Placeholders Outside CamelContext
-
-*Since 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:
-
-[source,xml]
+[source,properties]
 ----
-<!-- blueprint property placeholders -->
-<cm:property-placeholder persistent-id="my-placeholders" update-strategy="reload">
-  <cm:default-properties>
-    <cm:property name="greeting" value="Hello"/>
-    <cm:property name="destination" value="mock:result"/>
-  </cm:default-properties>
-</cm:property-placeholder>
-
-<!-- a bean that uses a blueprint property placeholder -->
-<bean id="myCoolBean" class="org.apache.camel.test.blueprint.MyCoolBean">
-  <property name="say" value="${greeting}"/>
-</bean>
-
-<camelContext xmlns="http://camel.apache.org/schema/blueprint">
-
-  <route>
-    <from uri="direct:start"/>
-    <bean ref="myCoolBean" method="saySomething"/>
-    <to uri="{{destination}}"/>
-  </route>
-
-</camelContext>
+greeting = Hi
+cool = awesome
 ----
 
-Notice that we have a `<bean>` which refers to one of the properties. And in
-the Camel route we refer to the other using the `{{ }}` notation.
+Will be resolved to:
 
-Now if you want to override these Blueprint properties from an unit
-test, you can do this as shown below:
-
-[source,java]
+[source,text]
 ----
-protected String useOverridePropertiesWithConfigAdmin(Dictionary props) {
-    // add the properties we want to override
-    props.put("greeting", "Bye");
-
-    // return the PID of the config-admin we are using in the blueprint xml file
-    return "my-placeholders";
-}
+Hi Camel user, Camel is awesome dont you think?
 ----
 
-To do this we override and implement the
-`useOverridePropertiesWithConfigAdmin` method. We can then put the
-properties we want to override on the given props parameter. And the
-return value _must_ be the persistence-id of
-the `<cm:property-placeholder>` tag, which you define in the blueprint
-XML file.
-
-[[UsingPropertyPlaceholder-Usinga.cfgor.propertiesFileForBlueprintPropertyPlaceholders]]
-== Using a `.cfg` or `.properties` File For Blueprint Property Placeholders
+== Using property placeholders for any kind of attribute in Spring XML files
 
-*Since Camel 2.10.4*
+Previously it was only the `xs:string` type attributes in the XML DSL
+that support placeholders. For example often a timeout attribute would
+be a `xs:int` type and thus you cannot set a string value as the
+placeholder key. This is now possible using a special
+placeholder namespace.
 
-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 ServiceMix/Karaf then this container has a convention that it
-loads the properties from a file in the etc directory with the naming
-`etc/pid.cfg`, where `pid` is the persistence-id.
+In the example below we use the `prop` prefix for the namespace
+`\http://camel.apache.org/schema/placeholder`. Now we can use `prop:` as prefix
+to configure any kind of XML attributes in Spring XML files.
 
-For example in the blueprint XML file we have the
-`persistence-id="stuff"`, which mean it will load the configuration
-file as `etc/stuff.cfg`.
+In the example below we want to use a placeholder for the `stopOnException` option in
+the xref:{eip-vc}:eips:multicast-eip.adoc[Multicast] EIP. The `stopOnException` is a `xs:boolean` type,
+so we cannot configure this as:
 
 [source,xml]
 ----
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
-           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
-           xsi:schemaLocation="
-             http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd
-             http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
-
-<!-- blueprint property placeholders, that will use etc/stuff.cfg as the properties file -->
-<cm:property-placeholder persistent-id="stuff" update-strategy="reload"/>
-
-<!-- a bean that uses a blueprint property placeholder -->
-<bean id="myCoolBean" class="org.apache.camel.test.blueprint.MyCoolBean">
-  <property name="say" value="${greeting}"/>
-</bean>
-
-<camelContext xmlns="http://camel.apache.org/schema/blueprint">
-
-  <route>
-    <from uri="direct:start"/>
-    <bean ref="myCoolBean" method="saySomething"/>
-    <to uri="mock:result"/>
-  </route>
-
-</camelContext>
-----
-
-Now if you want to unit test this blueprint XML file, then you can override
-the `loadConfigAdminConfigurationFile` and tell Camel which file to
-load as shown below:
-
-[source,java]
-----
-@Override
-protected String[] loadConfigAdminConfigurationFile() {
-    // String[0] = tell Camel the path of the .cfg file to use for OSGi ConfigAdmin in the blueprint XML file
-    // String[1] = tell Camel the persistence-id of the cm:property-placeholder in the blueprint XML file
-    return new String[]{"src/test/resources/etc/stuff.cfg", "stuff"};
-}
-----
-Notice that this method requires to return a `String[]` with 2 values. The
-1st value is the path for the configuration file to load. The second
-value is the persistence-id of the `<cm:property-placeholder>` tag.
-
-The `stuff.cfg` file is just a plain properties file with the property
-placeholders such as:
-
-[source,java]
-----
-== this is a comment
-greeting=Bye
+<multicast stopOnException="{{stop}}">
+   ...
+</multicast>
 ----
 
+Instead, we must use the `prop:` namespace, so we must add this namespace
+in the top of the XML file in the `<beans>` tag.
 
-[[UsingPropertyPlaceholder-Usinga.cfgfileandOverridingPropertiesforBlueprintPropertyPlaceholders]]
-== Using a `.cfg` file and Overriding Properties for Blueprint Property Placeholders
-
-You can do both as well. Here is a complete example. First we have the
-Blueprint XML file:
+To configure the option we must then use the `prop:optionName` as shown below:
 
 [source,xml]
 ----
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
-           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
-           xsi:schemaLocation="
-             http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd
-             http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
-
-  <!-- blueprint property placeholders, that will use etc/stuff.cfg as the properties file -->
-  <cm:property-placeholder persistent-id="stuff" update-strategy="reload">
-    <cm:default-properties>
-      <cm:property name="greeting" value="Hello" />
-      <cm:property name="echo" value="Hey" />
-      <cm:property name="destination" value="mock:original" />
-    </cm:default-properties>
-  </cm:property-placeholder>
-
-  <!-- a bean that uses a blueprint property placeholder -->
-  <bean id="myCoolBean" class="org.apache.camel.test.blueprint.MyCoolBean">
-    <property name="say" value="${greeting}"/>
-    <property name="echo" value="${echo}"/>
-  </bean>
-
-  <camelContext xmlns="http://camel.apache.org/schema/blueprint">
-
-    <route>
-      <from uri="direct:start"/>
-      <bean ref="myCoolBean" method="saySomething"/>
-      <to uri="{{destination}}"/>
-      <bean ref="myCoolBean" method="echoSomething"/>
-      <to uri="{{destination}}"/>
-    </route>
-
-  </camelContext>
-
-</blueprint>
+<multicast prop:stopOnException="stop">
+  ...
+</multicast>
 ----
 
-And in the unit test class we do as follows:
+The complete example is below:
 
-[source,java]
+[source,xml]
 ----
-/**
- * This example will load a Blueprint .cfg file (which will initialize configadmin), and also override its property
- * placeholders from this unit test source code directly (the change will reload blueprint container).
- */
-public class ConfigAdminLoadConfigurationFileAndOverrideTest extends CamelBlueprintTestSupport {
-
-    @Override
-    protected String getBlueprintDescriptor() {
-        // which blueprint XML file to use for this test
-        return "org/apache/camel/test/blueprint/configadmin-loadfileoverride.xml";
-    }
-
-    @Override
-    protected String[] loadConfigAdminConfigurationFile() {
-        // which .cfg file to use, and the name of the persistence-id
-        return new String[]{"src/test/resources/etc/stuff.cfg", "stuff"};
-    }
-
-    @Override
-    protected String useOverridePropertiesWithConfigAdmin(Dictionary props) throws Exception {
-        // override / add extra properties
-        props.put("destination", "mock:extra");
-
-        // return the persistence-id to use
-        return "stuff";
-    }
-
-    @Test
-    public void testConfigAdmin() throws Exception {
-        // mock:original comes from <cm:default-properties>/<cm:property name="destination" value="mock:original" />
-        getMockEndpoint("mock:original").setExpectedMessageCount(0);
-        // mock:result comes from loadConfigAdminConfigurationFile()
-        getMockEndpoint("mock:result").setExpectedMessageCount(0);
-        // mock:extra comes from useOverridePropertiesWithConfigAdmin()
-        getMockEndpoint("mock:extra").expectedBodiesReceived("Bye World", "Yay Bye WorldYay Bye World");
-
-        template.sendBody("direct:start", "World");
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:prop="http://camel.apache.org/schema/placeholder"
+       xsi:schemaLocation="
+           http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+           http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
 
-        assertMockEndpointsSatisfied();
-    }
+    <bean id="damn" class="java.lang.IllegalArgumentException">
+        <constructor-arg index="0" value="Damn"/>
+    </bean>
 
-}
+    <camelContext xmlns="http://camel.apache.org/schema/spring">
+        <propertyPlaceholder id="properties" location="classpath:myprop.properties"/>
+        <route>
+            <from uri="direct:start"/>
+            <!-- use prop namespace, to define a property placeholder, which maps to option stopOnException={{stop}} -->
+            <multicast prop:stopOnException="stop">
+                <to uri="mock:a"/>
+                <throwException ref="damn"/>
+                <to uri="mock:b"/>
+            </multicast>
+        </route>
+    </camelContext>
+</beans>
 ----
 
-And the `etc/stuff.cfg` configuration file contains:
+In our properties file we have the value defined as:
 
-[source,java]
+[source,properties]
 ----
-greeting=Bye
-echo=Yay
-destination=mock:result
+stop = true
 ----
 
 
-[[UsingPropertyPlaceholder-BridgingSpringandCamelPropertyPlaceholders-1]]
-== Bridging Spring and Camel Property Placeholders
+== Bridging Camel property placeholders with Spring XML files
 
-*Since Camel 2.10*
+NOTE: If you are using Spring Boot then this does not apply.
+This is only for legacy Camel and Spring applications which are using Spring XML files.
 
 The Spring Framework does not allow third-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
+mechanism. However, you can bridge Spring and Camel by declaring a
 Spring bean with the type
 `org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer`,
 which is a Spring
@@ -731,262 +432,125 @@ tag as shown below:
 
 Notice how the hello bean is using pure Spring property placeholders using
 the `${}` notation. And in the Camel routes we use the Camel
-placeholder notation with `{{ }}`.
-
-[[UsingPropertyPlaceholder-ClashingSpringPropertyPlaceholderswithCamelsLanguage]]
-== Clashing Spring Property Placeholders with Camels xref:components:languages:simple-language.adoc[Simple] Language
-
-Take notice when using Spring bridging placeholder then the
-spring `${}` syntax clashes with the xref:components:languages:simple-language.adoc[Simple] in
-Camel, and therefore take care.
-
-Example:
-
-[source,xml]
-----
-<setHeader name="Exchange.FILE_NAME">
-    <simple>{{file.rootdir}}/${in.header.CamelFileName}</simple>
-</setHeader>
-----
-
-clashes with Spring property placeholders, and you should
-use `$simple{}` to indicate using the xref:components:languages:simple-language.adoc[Simple]
-language in Camel.
-
-
-[source,xml]
-----
-<setHeader name="Exchange.FILE_NAME">
-    <simple>{{file.rootdir}}/$simple{in.header.CamelFileName}</simple>
-</setHeader>
-----
-
-An alternative is to configure the `PropertyPlaceholderConfigurer`
-with `ignoreUnresolvablePlaceholders` option to `true`.
-
-[[UsingPropertyPlaceholder-OverridingPropertiesfromCamelTestKit]]
-== Overriding Properties from Camel Test Kit
-
-*Since Camel 2.10*
-
-When xref:testing.adoc[Testing] with Camel and using the
-xref:components::properties-component.adoc[Properties] component, you may want to be able to
-provide the properties to be used from directly within the unit test
-source code. This is now possible from Camel 2.10, as the Camel test
-kits, e.g., `CamelTestSupport` class offers the following methods
-
-* `useOverridePropertiesWithPropertiesComponent`
-* `ignoreMissingLocationWithPropertiesComponent`
-
-So for example in your unit test classes, you can override the
-`useOverridePropertiesWithPropertiesComponent` method and return a
-`java.util.Properties` that contains the properties which should be
-preferred to be used.
-
-[source,java]
-----
-@Override
-protected Properties useOverridePropertiesWithPropertiesComponent() {
-    Properties extra = new Properties();
-    extra.put("destination", "mock:extra");
-    extra.put("greeting", "Bye");
-    return extra;
-}
-----
-
-This can be done from any of the Camel Test kits, such as `camel-test`,
-`camel-test-spring` and `camel-test-blueprint`.
-
-The `ignoreMissingLocationWithPropertiesComponent` can be used to
-instruct Camel to ignore any locations which was not discoverable. For
-example if you run the unit test, in an environment that does not have
-access to the location of the properties.
-
-
-[[UsingPropertyPlaceholder-UsingPropertyInject]]
-== Using `@PropertyInject`
-
-*Since Camel 2.12*
-
-Camel allows to inject property placeholders in POJOs using
-the `@PropertyInject` annotation which can be set on fields and setter
-methods. For example you can use that with `RouteBuilder` classes,
-such as shown below:
-
-[source,java]
-----
-public class MyRouteBuilder extends RouteBuilder {
-
-    @PropertyInject("hello")
-    private String greeting;
+placeholder notation with `{{key}}`.
 
-    @Override
-    public void configure() throws Exception {
-        from("direct:start")
-            .transform().constant(greeting)
-            .to("{{result}}");
-    }
-}
-----
-
-Notice we have annotated the greeting field with `@PropertyInject` and
-define it to use the key `hello`. Camel will then lookup the property
-with this key and inject its value, converted to a String type.
-
-You can also use multiple placeholders and text in the key, for example
-we can do:
-
-[source,java]
-----
-@PropertyInject("Hello {{name}} how are you?")
-private String greeting;
-----
-
-This will lookup the placeholder with they key `name`.
-
-You can also add a default value if the key does not exists, such as:
-
-[source,java]
-----
-@PropertyInject(value = "myTimeout", defaultValue = "5000")
-private int timeout;
-----
-
-
-[[UsingPropertyPlaceholder-UsingOutoftheBoxFunctions]]
-== Using Out of the Box Functions
-
-*Since Camel 2.14.1*
+== Using out of the box functions
 
-The xref:components::properties-component.adoc[Properties] component includes the following
-functions out of the box
+The xref:components::properties-component.adoc[Properties] component includes the following functions out of the box:
 
-* `env` - A function to lookup the property from OS environment
-variables.
-* `sys` - A function to lookup the property from Java JVM system
-properties.
-* `service` - A function to lookup the property from OS environment
-variables using the service naming idiom.
-* `service.host` - **Camel 2.16.1: **A function to lookup the
-property from OS environment variables using the service naming idiom
-returning the hostname part only.
-* `service.port` - **Camel 2.16.1: **A function to lookup the
-property from OS environment variables using the service naming idiom
-returning the port part only.
+* `env` - A function to lookup the property from OS environment variables
+* `sys` - A function to lookup the property from Java JVM system properties
+* `service` - A function to lookup the property from OS environment variables using the service naming idiom
+* `service.name` - A function to lookup the property from OS environment variables using the service naming idiom returning the hostname part only
+* `service.port` - A function to lookup the property from OS environment variables using the service naming idiom returning the port part only
 
-As you can see these functions is intended to make it easy to lookup
-values from the environment. As they are provided out of the box, they
-can easily be used as shown below:
+As you can see these functions is intended to make it easy to lookup values from the environment.
+As they are provided out of the box, they can easily be used as shown below:
 
 [source,xml]
 ----
-<camelContext xmlns="http://camel.apache.org/schema/blueprint">
+  <camelContext xmlns="http://camel.apache.org/schema/blueprint">
     <route>
-        <from uri="direct:start"/>
-        <to uri="{{env:SOMENAME}}"/>
-        <to uri="{{sys:MyJvmPropertyName}}"/>
+      <from uri="direct:start"/>
+      <to uri="{{env:SOMENAME}}"/>
+      <to uri="{{sys:MyJvmPropertyName}}"/>
     </route>
-</camelContext>
+  </camelContext>
 ----
 
-You can use default values as well, so if the property does not exists,
-you can define a default value as shown below, where the default value
-is a `log:foo` and `log:bar` value.
-
+You can use default values as well, so if the property does not exist, you can define a default value as shown below, where the default value is a `log:foo` and `log:bar` value.
 
 [source,xml]
 ----
-<camelContext xmlns="http://camel.apache.org/schema/blueprint">
+  <camelContext xmlns="http://camel.apache.org/schema/blueprint">
     <route>
-        <from uri="direct:start"/>
-        <to uri="{{env:SOMENAME:log:foo}}"/>
-        <to uri="{{sys:MyJvmPropertyName:log:bar}}"/>
+      <from uri="direct:start"/>
+      <to uri="{{env:SOMENAME:log:foo}}"/>
+      <to uri="{{sys:MyJvmPropertyName:log:bar}}"/>
     </route>
-</camelContext>
+  </camelContext>
 ----
 
-The service function is for looking up a service which is defined using
-OS environment variables using the service naming idiom, to refer to a
-service location using `hostname : port`
+The service function is for looking up a service which is defined using OS environment variables using the service naming idiom, to refer to a service location using `hostname : port`
 
-* __NAME___SERVICE_HOST
-* __NAME___SERVICE_PORT
+* __NAME__**_SERVICE_HOST**
+* __NAME__**_SERVICE_PORT**
 
-in other words the service uses `_SERVICE_HOST` and `_SERVICE_PORT`
-as prefix. So if the service is named `FOO`, then the OS environment
-variables should be set as
+in other words the service uses `_SERVICE_HOST` and `_SERVICE_PORT` as prefix.
+So if the service is named FOO, then the OS environment variables should be set as
 
-export $FOO_SERVICE_HOST=myserver export $FOO_SERVICE_PORT=8888
+[source]
+----
+export $FOO_SERVICE_HOST=myserver
+export $FOO_SERVICE_PORT=8888
+----
 
-For example if the `FOO` service a remote HTTP service, then we can
-refer to the service in the Camel endpoint URI, and use
-the xref:components::http-component.adoc[HTTP] component to make the HTTP call:
+For example if the FOO service a remote HTTP service, then we can refer to the service in the Camel endpoint uri, and use the HTTP component to make the HTTP call:
 
 [source,xml]
 ----
 <camelContext xmlns="http://camel.apache.org/schema/blueprint">
-    <route>
-        <from uri="direct:start"/>
-        <to uri="http://{{service:FOO}}/myapp"/>
-    </route>
+  <route>
+    <from uri="direct:start"/>
+    <to uri="http://{`{service:FOO}`}/myapp"/>
+  </route>
 </camelContext>
 ----
 
-And we can use default values if the service has not been defined, for
-example to call a service on localhost, maybe for unit testing etc:
+And we can use default values if the service has not been defined, for example to call a service on localhost, maybe for unit testing etc
 
 [source,xml]
 ----
 <camelContext xmlns="http://camel.apache.org/schema/blueprint">
-    <route>
-        <from uri="direct:start"/>
-        <to uri="http://{{service:FOO:localhost:8080}}/myapp"/>
-    </route>
+  <route>
+    <from uri="direct:start"/>
+    <to uri="http://{`{service:FOO:localhost:8080}`}/myapp"/>
+  </route>
 </camelContext>
 ----
 
-[[UsingPropertyPlaceholder-UsingCustomFunctions]]
-== Using Custom Functions (advanced)
+== Using custom functions (advanced)
 
-*Since Camel 2.14.1*
+The xref:components::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 placeholders, such as looking up in databases, do custom computations, or whatnot.
+The name of the function becomes the prefix used in the placeholder.
 
-The xref:components::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
-placeholders, such as looking up in databases, do custom computations,
-or whatnot. The name of the function becomes the prefix used in the
-placeholder. This is best illustrated in the example code below
+This is best illustrated in the example code below
 
 [source,xml]
 ----
-<bean id="beerFunction" class="MyBeerFunction"/>
-<camelContext xmlns="http://camel.apache.org/schema/blueprint">
-    <propertyPlaceholder id="properties" location="none" ignoreMissingLocation="true">
+<beans>
+    <bean id="beerFunction" class="MyBeerFunction"/>
+
+    <camelContext>
+      <propertyPlaceholder id="properties">
         <propertiesFunction ref="beerFunction"/>
-    </propertyPlaceholder>
-    <route>
+      </propertyPlaceholder>
+
+      <route>
         <from uri="direct:start"/>
         <to uri="{{beer:FOO}}"/>
         <to uri="{{beer:BAR}}"/>
-    </route>
-</camelContext>
+      </route>
+    </camelContext>
+</beans>
 ----
 
-Here we have a Camel XML route where we have defined
-the `<propertyPlaceholder>` to use a custom function, which we refer
-to be the bean id - e.g., the `beerFunction`. As the beer function
-uses `beer` as its name, then the placeholder syntax can trigger the
-beer function by starting with `beer:value`.
+Here we have a Camel XML route where we have defined the
+`<propertyPlaceholder>` to use a custom function, which we refer to be the bean id - eg the `beerFunction`.
+As the beer function uses `"beer"` as its name, then the placeholder syntax can trigger the beer function by starting with `beer:value`.
 
 The implementation of the function is only two methods as shown below:
 
 [source,java]
 ----
 public static final class MyBeerFunction implements PropertiesFunction {
+
     @Override
     public String getName() {
         return "beer";
     }
+
     @Override
     public String apply(String remainder) {
         return "mock:" + remainder.toLowerCase();
@@ -994,12 +558,10 @@ public static final class MyBeerFunction implements PropertiesFunction {
 }
 ----
 
-The function must implement
-the `org.apache.camel.spi.PropertiesFunction`
-interface. The method `getName` is  the name of the function, e.g.,
-`beer`. And the `apply` method is where we implement the custom
-logic to do. As the sample code is from an unit test, it just returns a
-value to refer to a mock endpoint.
+The function must implement the `org.apache.camel.spi.PropertiesFunction` interface.
+The method `getName` is the name of the function, eg beer.
+And the `apply` method is where we implement the custom logic to do.
+As the sample code is from an unit test, it just returns a value to refer to a mock endpoint.
 
 To register a custom function from Java code is as shown below:
 
@@ -1009,22 +571,31 @@ PropertiesComponent pc = context.getPropertiesComponent();
 pc.addFunction(new MyBeerFunction());
 ----
 
-== Negate boolean value
+== Writing custom property sources (advanced)
 
-If a property placeholder is a boolean value, then it is possible to negate (reverse) the value by using `!` as prefix in the key.
+The regular `PropertySource` will lookup the property on-demand,
+for example to lookup values from a backend source such as a database or HashiCorp Vault etc.
 
-[source,java]
-----
-// properties
-integration.ftpEnabled=true
+A `PropertySource` can define that it supports loading all its properties
+(by implementing `LoadablePropertiesSource`) from the source at once, for example from file system.
+This allows Camel properties component to load these properties at once during startup.
 
-// route
-from("ftp:....").autoStartup("{{integration.ftpEnabled}}")
-    .to("kafka:cheese")
+=== Using third party property sources
 
-from("jms:....").autoStartup("{{!integration.ftpEnabled}}")
-    .to("kafka:cheese")
+The properties component allows to plugin 3rd party sources to load and lookup properties via the `PropertySource`
+API from camel-api.
+
+For example the `camel-microprofile-config` component is implemented using this.
+The 3rd-party `PropertySource` can automatic be discovered from classpath when Camel is starting up.
+This is done by include the file `META-INF/services/org/apache/camel/property-source-factory` file which refers to the fully qualified class name of the `PropertySource` implementation.
+
+See xref:components:others:microprofile-config.adoc[MicroProfile Config] component as an example.
+
+You can also register 3rd-party property sources via Java API:
+
+[source,java]
+----
+PropertiesComponent pc = context.getPropertiesComponent();
+pc.addPropertySource(myPropertySource);
 ----
 
-In the example above then the FTP route or the JMS route should only be started. So if the FTP is enabled then JMS should be disable, and vise-versa.
-We can do this be negating the `autoStartup` in the JMS route, by using `!integration.ftpEnabled` as the key.

[camel] 01/04: Polish and cleanup documentation

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit b6c4d61f95ef80f8473a10050a048a36f154dac6
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Aug 18 13:59:18 2021 +0200

    Polish and cleanup documentation
---
 .../camel/catalog/docs/properties-component.adoc   | 820 +++------------------
 .../src/main/docs/properties-component.adoc        | 820 +++------------------
 .../modules/ROOT/pages/properties-component.adoc   | 820 +++------------------
 docs/user-manual/modules/ROOT/nav.adoc             |   4 +-
 .../modules/ROOT/pages/consumertemplate.adoc       |  28 +
 .../modules/ROOT/pages/producertemplate.adoc       |   4 +
 .../ROOT/pages/using-propertyplaceholder.adoc      | 377 ++++------
 docs/user-manual/modules/faq/nav.adoc              |   1 -
 ...spring-property-placeholder-with-camel-xml.adoc |  77 --
 docs/user-manual/modules/faq/pages/index.adoc      |   1 -
 10 files changed, 519 insertions(+), 2433 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/properties-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/properties-component.adoc
index cb2ec73..9115aa0 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/properties-component.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/properties-component.adoc
@@ -10,99 +10,27 @@
 *Since Camel {since}*
 
 The properties component is used for property placeholders in your Camel application, such as endpoint URIs.
-It is *not* a regular Camel component with producer and consumer for routing messages. However for historical
-reasons it was named `PropertiesComponent` and this name is commonly known and therfore we keep using it.
+It is *not* a regular Camel component with producer and consumer for routing messages.
+However, for historical reasons it was named `PropertiesComponent` and this name is commonly known so we keep using it.
 
-== Spring Boot Auto-Configuration
-
-The component supports 10 options, which are listed below.
-
-
-
-[width="100%",cols="2,5,^1,2",options="header"]
-|===
-| Name | Description | Default | Type
-| *camel.component.properties.auto-discover-properties-sources* | Whether to automatically discovery instances of PropertiesSource from registry and service factory. | true | Boolean
-| *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.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 (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
-| *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.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
-|===
-
-[TIP]
-**Resolving property from Java code** +
-You can use the method `resolveProperty` on the `PropertiesComponent` to resolve a property from Java code.
-Or use the method `resolvePropertyPlaceholders` on the `CamelContext` to resolve property placeholders in a string.
-
-== Using PropertyPlaceholder
-
-Camel now provides a new `PropertiesComponent` in *camel-core* which
-allows you to use property placeholders when defining Camel
-Endpoint URIs.
-
-This works much like you would do if using Spring's
-`<property-placeholder>` tag. However Spring have a limitation which
-prevents 3rd party frameworks to leverage Spring property placeholders
-to the fullest. See more at
-xref:manual:faq:how-do-i-use-spring-property-placeholder-with-camel-xml.adoc[How do
-I use Spring Property Placeholder with Camel XML].
+IMPORTANT: See the xref:latest@manual:ROOT:using-propertyplaceholder[Property Placeholder] documentation for general information on using property placeholders in Camel.
 
-[TIP]
-**Bridging Spring and Camel property placeholders** +
-You can bridge the Spring property placeholder
-with Camel, see further below for more details.
+The properties component requires to load the properties (key=value pairs) from an external source such as `.properties` files.
+The component is pluggable and you can configure to use other sources or write a custom implementation (for example to load from a database).
 
-The property placeholder is generally in use when doing:
 
-* lookup or creating endpoints
-* lookup of beans in the Registry
-* additional supported in Spring XML (see below in examples)
-* using Blueprint PropertyPlaceholder with Camel
-xref:properties-component.adoc[Properties] component
-* using `@PropertyInject` to inject a property in a POJO
-* Using default value if a property does not exists
-* Include out of the box functions, to lookup property
-values from OS environment variables, JVM system properties, or the
-service idiom.
-* Using custom functions, which can be plugged into the
-property component.
+== Defining location of properties files
 
-== 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.
-
-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).
-
-[NOTE]
-====
-Do not use colon in the property key. The colon is used as a separator
-token when you are providing a default value.
-====
-
-== Defining location
-
-The properties component needs to know a location(s) where to resolve the
-properties. You can define 1 to many locations. If you define the
-location in a single String property you can separate multiple locations
-with comma such as:
+The properties component needs to know a location(s) where to resolve the properties.
+You can define one to many locations.
+Multiple locations can be separated by comma such as:
 
 [source,java]
 ----
 pc.setLocation("com/mycompany/myprop.properties,com/mycompany/other.properties");
 ----
 
-You can set which location can be discarded if missing by by setting the ``optional`` attribute, which is false by default, i.e:
+You can mark a location to be optional, which means that Camel will ignore the location if not present:
 
 [source,java]
 ----
@@ -111,10 +39,9 @@ pc.setLocations(
     "com/mycompany/defaults.properties");
 ----
 
-== Using system and environment variables in locations
+=== Using system and environment variables in locations
 
-The location now supports using placeholders for JVM system properties
-and OS environments variables.
+The location now supports using placeholders for JVM system properties and OS environments variables.
 
 For example:
 
@@ -123,11 +50,11 @@ For example:
 location=file:${karaf.home}/etc/foo.properties
 ----
 
-In the location above we defined a location using the file scheme using
-the JVM system property with key `karaf.home`.
+In the location above we defined a location using the file scheme using the JVM system property with key `karaf.home`.
 
 To use an OS environment variable instead you would have to prefix with
-`env:`. You can also prefix with `env.`, however this style is not recommended because all the other functions use colon.
+`env:`.
+You can also prefix with `env.`, however this style is not recommended because all the other functions use colon.
 
 [source]
 ----
@@ -138,9 +65,8 @@ Where `APP_HOME` is an OS environment.
 
 [NOTE]
 ====
-Some OS'es (such as Linux) do not support dashes in environment variable names,
-so here we are using `APP_HOME`. But if you specify `APP-HOME` then Camel 3 will automatic lookup
-the value as `APP_HOME` (with underscore) as fallback.
+Some OS'es (such as Linux) do not support dashes in environment variable names, so here we are using `APP_HOME`.
+But if you specify `APP-HOME` then Camel 3 will automatic lookup the value as `APP_HOME` (with underscore) as fallback.
 ====
 
 You can have multiple placeholders in the same location, such as:
@@ -150,22 +76,11 @@ You can have multiple placeholders in the same location, such as:
 location=file:${env:APP_HOME}/etc/${prop.name}.properties
 ----
 
-== Configuring in Java DSL
-
-You have to create and register the `PropertiesComponent` under the name
-`properties` such as:
-
-[source,java]
-----
-PropertiesComponent pc = camelContext.getPropertiesComponent();
-pc.setLocation("classpath:com/mycompany/myprop.properties");
-----
-
-== Configuring in Spring XML
+=== Defining location of properties files in Spring XML
 
-Spring XML offers two variations to configure. You can define a spring
-bean as a `PropertiesComponent` which resembles the way done in Java
-DSL. Or you can use the `<propertyPlaceholder>` tag.
+Spring XML offers two variations to configure.
+You can define a spring bean as a `PropertiesComponent` which resembles the way done in Java.
+Or you can use the `<propertyPlaceholder>` tag.
 
 [source,xml]
 ----
@@ -174,21 +89,20 @@ DSL. Or you can use the `<propertyPlaceholder>` tag.
 </bean>
 ----
 
-Using the `<propertyPlaceholder>` tag makes the configuration a bit more
-fresh such as:
+Using the `<propertyPlaceholder>` allows to configure this within the `<camelContext>` tag.
 
 [source,xml]
 ----
-<camelContext ...>
+<camelContext>
    <propertyPlaceholder id="properties" location="com/mycompany/myprop.properties"/>
 </camelContext>
 ----
 
-Setting the properties location through the location tag works just fine but sometime you have a number of resources to take into account and starting from *Camel 2.19.0* you can set the properties location with a dedicated propertiesLocation:
+For fine grained configuration of the location, then this can be done as follows:
 
 [source,xml]
 ----
-<camelContext ...>
+<camelContext>
   <propertyPlaceholder id="myPropertyPlaceholder">
     <propertiesLocation
       resolver = "classpath"
@@ -206,134 +120,9 @@ Setting the properties location through the location tag works just fine but som
 </camelContext>
 ----
 
-[TIP]
-**Specifying the cache option inside XML** +
-Camel supports specifying a value for the cache option both
-inside the Spring as well as the Blueprint XML.
-
-== Using a Properties from the Registry
-
-For example in OSGi you may want to expose a service which returns the
-properties as a `java.util.Properties` object.
-
-Then you could setup the xref:properties-component.adoc[Properties] component as
-follows:
-
-[source,xml]
-----
- <propertyPlaceholder id="properties" location="ref:myProperties"/>
-----
-
-Where `myProperties` is the id to use for lookup in the OSGi registry.
-Notice we use the `ref:` prefix to tell Camel that it should lookup the
-properties for the Registry.
-
-== Examples using properties component
-
-When using property placeholders in the endpoint URIs you can either use
-the `properties:` component or define the placeholders directly in the
-URI. We will show example of both cases, starting with the former.
-
-[source,java]
-----
-// properties
-cool.end=mock:result
-
-// route
-from("direct:start").to("{{cool.end}}");
-----
-
-You can also use placeholders as a part of the endpoint uri:
-
-[source,java]
-----
-// properties
-cool.foo=result
-
-// route
-from("direct:start").to("mock:{{cool.foo}}");
-----
-
-In the example above the to endpoint will be resolved to `mock:result`.
-
-You can also have properties with refer to each other such as:
-
-[source,java]
-----
-// properties
-cool.foo=result
-cool.concat=mock:{{cool.foo}}
-
-// route
-from("direct:start").to("mock:{{cool.concat}}");
-----
-
-Notice how `cool.concat` refer to another property.
-
-And you can use placeholders several times:
-
-[source,java]
-----
-// properties
-cool.start=direct:start
-cool.showid=true
-cool.result=result
-
-// route
-from("{{cool.start}}")
-    .to("log:{{cool.start}}?showBodyType=false&showExchangeId={{cool.showid}}")
-    .to("mock:{{cool.result}}");
-----
-
-You can also your property placeholders when using
-ProducerTemplate for example:
-
-[source,java]
-----
-template.sendBody("{{cool.start}}", "Hello World");
-----
-
-== Example with xref:languages:simple-language.adoc[Simple] language
-
-The xref:languages:simple-language.adoc[Simple] language now also support using property
-placeholders, for example in the route below:
-
-[source,java]
-----
-// properties
-cheese.quote=Camel rocks
-
-// route
-from("direct:start")
-    .transform().simple("Hi ${body} do you think ${properties:cheese.quote}?");
-----
-
-== Negate boolean value
-
-If a property placeholder is a boolean value, then it is possible to negate (reverse) the value by using `!` as prefix in the key.
-
-[source,java]
-----
-// properties
-integration.ftpEnabled=true
-
-// route
-from("ftp:....").autoStartup("{{integration.ftpEnabled}}")
-    .to("kafka:cheese")
-
-from("jms:....").autoStartup("{{!integration.ftpEnabled}}")
-    .to("kafka:cheese")
-----
-
-In the example above then the FTP route or the JMS route should only be started. So if the FTP is enabled then JMS should be disable, and vise-versa.
-We can do this be negating the `autoStartup` in the JMS route, by using `!integration.ftpEnabled` as the key.
-
 == Additional property placeholder supported in Spring XML
 
-The property placeholders is also supported in many of the Camel Spring
-XML tags such as
-`<package>, <packageScan>, <contextScan>, <jmxAgent>, <endpoint>, <routeBuilder>,
-and the others.
+The property placeholders is also supported in many of the Camel Spring XML tags such as `<package>, <packageScan>, <contextScan>, <jmxAgent>, <endpoint>, <routeBuilder>, and the others.
 
 The example below has property placeholder in the `<jmxAgent>` tag:
 
@@ -352,8 +141,7 @@ The example below has property placeholder in the `<jmxAgent>` tag:
 </camelContext>
 ----
 
-You can also define property placeholders in the various attributes on
-the `<camelContext>` tag such as `trace` as shown here:
+You can also define property placeholders in the various attributes on the `<camelContext>` tag such as `trace` as shown here:
 
 [source,xml]
 ----
@@ -372,8 +160,7 @@ the `<camelContext>` tag such as `trace` as shown here:
 
 == Using JVM system properties or Environment variables as override or fallback values
 
-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 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 both of them are in override mode, and they are check in the following order:
 
@@ -388,445 +175,51 @@ 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
-
-In the example below we use the `prop` prefix for the namespace
-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
-in the Multicast to indicate that the option
-`stopOnException` should be the value of the placeholder with the key
-"stop".
-
-In our properties file we have the value defined as
-
-[source]
-----
-stop=true
-----
-
-== Using Blueprint property placeholder with Camel routes
-
-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
-OSGi Blueprint property placeholder in the XML file as shown below:
-
-[source,xml]
-----
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
-           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
-           xsi:schemaLocation="
-           http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
-
-    <!-- OSGI blueprint property placeholder -->
-    <cm:property-placeholder id="myblueprint.placeholder" persistent-id="camel.blueprint">
-        <!-- list some properties as needed -->
-        <cm:default-properties>
-            <cm:property name="result" value="mock:result"/>
-        </cm:default-properties>
-    </cm:property-placeholder>
-
-    <camelContext xmlns="http://camel.apache.org/schema/blueprint">
-        <!-- in the route we can use {{ }} placeholders which will lookup in blueprint
-             as Camel will auto detect the OSGi blueprint property placeholder and use it -->
-        <route>
-            <from uri="direct:start"/>
-            <to uri="mock:foo"/>
-            <to uri="{{result}}"/>
-        </route>
-    </camelContext>
-</blueprint>
-----
-
-=== Using OSGi blueprint property placeholders in Camel routes
-
-By default Camel detects and uses OSGi blueprint property placeholder
-service. You can disable this by setting the attribute
-`useBlueprintPropertyResolver` to false on the `<camelContext>`
-definition.
-
-=== About placeholder syntax
-
-Notice how we can use the Camel syntax for placeholders `{{` and `}}` in the
-Camel route, which will lookup the value from OSGi blueprint.
-
-The blueprint syntax for placeholders is `${ }`. So outside the
-`<camelContext>` you must use the `${ }` syntax. Where as inside
-`<camelContext>` you must use `{{` and `}}` syntax.
-
-OSGi blueprint allows you to configure the syntax, so you can actually
-align those if you want.
-
-You can also explicit refer to a specific OSGi blueprint property
-placeholder by its id. For that you need to use the Camel's
-`<propertyPlaceholder>` as shown in the example below:
-
-[source,xml]
-----
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
-           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
-           xsi:schemaLocation="
-           http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
-
-    <!-- OSGI blueprint property placeholder -->
-    <cm:property-placeholder id="myblueprint.placeholder" persistent-id="camel.blueprint">
-        <!-- list some properties as needed -->
-        <cm:default-properties>
-            <cm:property name="prefix.result" value="mock:result"/>
-        </cm:default-properties>
-    </cm:property-placeholder>
-
-    <camelContext xmlns="http://camel.apache.org/schema/blueprint">
-        <!-- using Camel properties component and refer to the blueprint property placeholder by its id -->
-        <propertyPlaceholder id="properties" location="blueprint:myblueprint.placeholder"/>
-
-        <!-- in the route we can use {{ }} placeholders which will lookup in blueprint -->
-        <route>
-            <from uri="direct:start"/>
-            <to uri="mock:foo"/>
-            <to uri="{{prefix.result}}"/>
-        </route>
-    </camelContext>
-</blueprint>
-----
-
-
-== Explicit referring to a OSGi blueprint placeholder in Camel
-
-Notice how we use the `blueprint` scheme to refer to the OSGi blueprint
-placeholder by its id. This allows you to mix and match, for example you
-can also have additional schemes in the location. For example to load a
-file from the classpath you can do:
-
-[source]
-----
-location="blueprint:myblueprint.placeholder,classpath:myproperties.properties"
-----
-
-Each location is separated by comma.
-
-== Overriding Blueprint property placeholders outside CamelContext
-
-When using Blueprint property placeholder in the Blueprint XML file, you
-can declare the properties directly in the XML file as shown below:
-
-[source,xml]
-----
-<!-- blueprint property placeholders -->
-<cm:property-placeholder persistent-id="my-placeholders" update-strategy="reload">
-  <cm:default-properties>
-    <cm:property name="greeting" value="Hello"/>
-    <cm:property name="destination" value="mock:result"/>
-  </cm:default-properties>
-</cm:property-placeholder>
-
-<!-- a bean that uses a blueprint property placeholder -->
-<bean id="myCoolBean" class="org.apache.camel.test.blueprint.MyCoolBean">
-  <property name="say" value="${greeting}"/>
-</bean>
-
-<camelContext xmlns="http://camel.apache.org/schema/blueprint">
-
-  <route>
-    <from uri="direct:start"/>
-    <bean ref="myCoolBean" method="saySomething"/>
-    <to uri="{{destination}}"/>
-  </route>
-
-</camelContext>
-----
-
-Notice that we have a `<bean>` which refers to one of the properties. And
-in the Camel route we refer to the other using the `{{` and `}}` notation.
-
-Now if you want to override these Blueprint properties from an unit
-test, you can do this as shown below:
-
-[source,java]
-----
-protected String useOverridePropertiesWithConfigAdmin(Dictionary props) {
-    // add the properties we want to override
-    props.put("greeting", "Bye");
-
-    // return the PID of the config-admin we are using in the blueprint xml file
-    return "my-placeholders";
-}
-----
-
-To do this we override and implement the
-`useOverridePropertiesWithConfigAdmin` method. We can then put the
-properties we want to override on the given props parameter. And the
-return value *must* be the `persistence-id` of the
-`<cm:property-placeholder>` tag, which you define in the blueprint XML
-file.
-
-== Using .cfg or .properties file for Blueprint property placeholders
-
-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
-loads the properties from a file in the etc directory with the naming
-`etc/pid.cfg`, where `pid` is the `persistence-id`.
-
-For example in the blueprint XML file we have the
-`persistence-id="stuff"`, which mean it will load the configuration file
-as `etc/stuff.cfg`.
-
-Now if you want to unit test this blueprint XML file, then you can
-override the `loadConfigAdminConfigurationFile` and tell Camel which
-file to load as shown below:
-
-[source,java]
-----
-@Override
-protected String[] loadConfigAdminConfigurationFile() {
-    // String[0] = tell Camel the path of the .cfg file to use for OSGi ConfigAdmin in the blueprint XML file
-    // String[1] = tell Camel the persistence-id of the cm:property-placeholder in the blueprint XML file
-    return new String[]{"src/test/resources/etc/stuff.cfg", "stuff"};
-}
-----
-
-Notice that this method requires to return a `String[]` with 2 values. The
-1st value is the path for the configuration file to load.
-The 2nd value is the `persistence-id` of the `<cm:property-placeholder>`
-tag.
-
-The `stuff.cfg` file is just a plain properties file with the property
-placeholders such as:
-
-[source]
-----
-== this is a comment
-greeting=Bye
-----
-
-== Using .cfg file and overriding properties for Blueprint property placeholders
-
-You can do both as well. Here is a complete example. First we have the
-Blueprint XML file:
-
-And in the unit test class we do as follows:
-
-And the `etc/stuff.cfg` configuration file contains
-
-[source]
-----
-greeting=Bye
-echo=Yay
-destination=mock:result
-----
-
-== Bridging Spring and Camel property placeholders
-
-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
-bean with the type
-`org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer`, which
-is a Spring
-`org.springframework.beans.factory.config.PropertyPlaceholderConfigurer`
-type.
-
-To bridge Spring and Camel you must define a single bean as shown below:
-
-[source,xml]
-----
-  <!-- bridge spring property placeholder with Camel -->
-  <!-- you must NOT use the <context:property-placeholder at the same time, only this bridge bean -->
-  <bean id="bridgePropertyPlaceholder" class="org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer">
-    <property name="location" value="classpath:org/apache/camel/component/properties/cheese.properties"/>
-  </bean>
-----
-
-You *must not* use the spring `<context:property-placeholder>` namespace
-at the same time; this is not possible.
-
-After declaring this bean, you can define property placeholders using
-both the Spring style, and the Camel style within the `<camelContext>` tag
-as shown below:
-
-[source,xml]
-----
-  <!-- a bean that uses Spring property placeholder -->
-  <!-- the ${hi} is a spring property placeholder -->
-  <bean id="hello" class="org.apache.camel.component.properties.HelloBean">
-    <property name="greeting" value="${hi}"/>
-  </bean>
-
-  <camelContext xmlns="http://camel.apache.org/schema/spring">
-    <!-- in this route we use Camels property placeholder {{ }} style -->
-    <route>
-      <from uri="direct:{{cool.bar}}"/>
-      <bean ref="hello"/>
-      <to uri="{{cool.end}}"/>
-    </route>
-  </camelContext>
-----
-
-Notice how the hello bean is using pure Spring property placeholders
-using the `${ }` notation. And in the Camel routes we use the Camel
-placeholder notation with `{{` and `}}`.
-
-== Clashing Spring property placeholders with Camels Simple language
-
-Take notice when using Spring bridging placeholder then the spring `${ }`
-syntax clashes with the xref:languages:simple-language.adoc[Simple] in Camel, and therefore
-take care. For example:
-
-[source,xml]
-----
-<setHeader name="Exchange.FILE_NAME">
-  <simple>{{file.rootdir}}/${in.header.CamelFileName}</simple>
-</setHeader>
-----
-
-clashes with Spring property placeholders, and you should use `$simple{ }`
-to indicate using the xref:languages:simple-language.adoc[Simple] language in Camel.
-
-[source,xml]
-----
-<setHeader name="Exchange.FILE_NAME">
-  <simple>{{file.rootdir}}/$simple{in.header.CamelFileName}</simple>
-</setHeader>
-----
-
-An alternative is to configure the `PropertyPlaceholderConfigurer` with
-`ignoreUnresolvablePlaceholders` option to `true`.
-
-== Overriding properties from Camel test kit
-
-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
-source code. +
-Camel test kits, eg `CamelTestSupport` class offers the following methods
-
-* `useOverridePropertiesWithPropertiesComponent`
-* `ignoreMissingLocationWithPropertiesComponent`
-
-So for example in your unit test classes, you can override the
-`useOverridePropertiesWithPropertiesComponent` method and return a
-`java.util.Properties` that contains the properties which should be
-preferred to be used.
-
-=== Providing properties from within unit test source
-
-This can be done from any of the Camel Test kits, such as camel-test,
-camel-test-spring, and camel-test-blueprint.
-
-The `ignoreMissingLocationWithPropertiesComponent` can be used to
-instruct Camel to ignore any locations which was not discoverable, for
-example if you run the unit test, in an environment that does not have
-access to the location of the properties.
-
-== Using @PropertyInject
-
-Camel allows to inject property placeholders in POJOs using the
-`@PropertyInject` annotation which can be set on fields and setter
-methods.
-
-For example you can use that with `RouteBuilder` classes, such as shown
-below:
-
-[source,java]
-----
-public class MyRouteBuilder extends RouteBuilder {
-
-    @PropertyInject("hello")
-    private String greeting;
-
-    @Override
-    public void configure() throws Exception {
-        from("direct:start")
-            .transform().constant(greeting)
-            .to("{{result}}");
-    }
-
-}
-----
-
-Notice we have annotated the greeting field with `@PropertyInject` and
-define it to use the key `"hello"`. Camel will then lookup the property
-with this key and inject its value, converted to a String type.
-
-You can also use multiple placeholders and text in the key, for example
-we can do:
-
-[source,java]
-----
-@PropertyInject("Hello {{name}} how are you?")
-private String greeting;
-----
-
-This will lookup the placeholder with they key `"name"`.
-
-You can also add a default value if the key does not exists, such as:
-
-[source,java]
-----
-@PropertyInject(value = "myTimeout", defaultValue = "5000")
-private int timeout;
-----
 
 == Using out of the box functions
 
-The xref:properties-component.adoc[Properties] component includes the following
-functions out of the box
+The xref:properties-component.adoc[Properties] component includes the following functions out of the box:
 
 * `env` - A function to lookup the property from OS environment variables
-* `sys` - A function to lookup the property from Java JVM system
-properties
-* `service` - A function to lookup the property from OS environment
-variables using the service naming idiom
-* `service.name` - A function to lookup the
-property from OS environment variables using the service naming idiom
-returning the hostname part only
-* `service.port` - A function to lookup the
-property from OS environment variables using the service naming idiom
-returning the port part only
-
-As you can see these functions is intended to make it easy to lookup
-values from the environment. As they are provided out of the box, they
-can easily be used as shown below:
+* `sys` - A function to lookup the property from Java JVM system properties
+* `service` - A function to lookup the property from OS environment variables using the service naming idiom
+* `service.name` - A function to lookup the property from OS environment variables using the service naming idiom returning the hostname part only
+* `service.port` - A function to lookup the property from OS environment variables using the service naming idiom returning the port part only
+
+As you can see these functions is intended to make it easy to lookup values from the environment.
+As they are provided out of the box, they can easily be used as shown below:
 
 [source,xml]
 ----
   <camelContext xmlns="http://camel.apache.org/schema/blueprint">
     <route>
       <from uri="direct:start"/>
-      <to uri="{`{env:SOMENAME}`}"/>
-      <to uri="{`{sys:MyJvmPropertyName}`}"/>
+      <to uri="{{env:SOMENAME}}"/>
+      <to uri="{{sys:MyJvmPropertyName}}"/>
     </route>
   </camelContext>
 ----
 
-You can use default values as well, so if the property does not exists,
-you can define a default value as shown below, where the default value
-is a `log:foo` and `log:bar` value.
+You can use default values as well, so if the property does not exist, you can define a default value as shown below, where the default value is a `log:foo` and `log:bar` value.
 
 [source,xml]
 ----
   <camelContext xmlns="http://camel.apache.org/schema/blueprint">
     <route>
       <from uri="direct:start"/>
-      <to uri="{`{env:SOMENAME:log:foo}`}"/>
-      <to uri="{`{sys:MyJvmPropertyName:log:bar}`}"/>
+      <to uri="{{env:SOMENAME:log:foo}}"/>
+      <to uri="{{sys:MyJvmPropertyName:log:bar}}"/>
     </route>
   </camelContext>
 ----
 
-The service function is for looking up a service which is defined using
-OS environment variables using the service naming idiom, to refer to a
-service location using `hostname : port`
+The service function is for looking up a service which is defined using OS environment variables using the service naming idiom, to refer to a service location using `hostname : port`
 
 * __NAME__**_SERVICE_HOST**
 * __NAME__**_SERVICE_PORT**
 
-in other words the service uses `_SERVICE_HOST` and `_SERVICE_PORT` as
-prefix. So if the service is named FOO, then the OS environment
-variables should be set as
+in other words the service uses `_SERVICE_HOST` and `_SERVICE_PORT` as prefix.
+So if the service is named FOO, then the OS environment variables should be set as
 
 [source]
 ----
@@ -834,9 +227,7 @@ export $FOO_SERVICE_HOST=myserver
 export $FOO_SERVICE_PORT=8888
 ----
 
-For example if the FOO service a remote HTTP service, then we can refer
-to the service in the Camel endpoint uri, and use
-the HTTP component to make the HTTP call:
+For example if the FOO service a remote HTTP service, then we can refer to the service in the Camel endpoint uri, and use the HTTP component to make the HTTP call:
 
 [source,xml]
 ----
@@ -848,8 +239,7 @@ the HTTP component to make the HTTP call:
 </camelContext>
 ----
 
-And we can use default values if the service has not been defined, for
-example to call a service on localhost, maybe for unit testing etc
+And we can use default values if the service has not been defined, for example to call a service on localhost, maybe for unit testing etc
 
 [source,xml]
 ----
@@ -863,40 +253,33 @@ example to call a service on localhost, maybe for unit testing etc
 
 == Using custom functions (advanced)
 
-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
-placeholders, such as looking up in databases, do custom computations,
-or whatnot. The name of the function becomes the prefix used in the
-placeholder. This is best illustrated in the example code below
+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 placeholders, such as looking up in databases, do custom computations, or whatnot.
+The name of the function becomes the prefix used in the placeholder.
+This is best illustrated in the example code below
 
 [source,xml]
 ----
-<bean id="beerFunction" class="MyBeerFunction"/>
+<beans>
+    <bean id="beerFunction" class="MyBeerFunction"/>
 
-<camelContext xmlns="http://camel.apache.org/schema/blueprint">
-  <propertyPlaceholder id="properties">
-    <propertiesFunction ref="beerFunction"/>
-  </propertyPlaceholder>
+    <camelContext>
+      <propertyPlaceholder id="properties">
+        <propertiesFunction ref="beerFunction"/>
+      </propertyPlaceholder>
 
-  <route>
-    <from uri="direct:start"/>
-    <to uri="{`{beer:FOO}`}"/>
-    <to uri="{`{beer:BAR}`}"/>
-  </route>
-</camelContext>
+      <route>
+        <from uri="direct:start"/>
+        <to uri="{{beer:FOO}}"/>
+        <to uri="{{beer:BAR}}"/>
+      </route>
+    </camelContext>
+</beans>
 ----
 
-[NOTE]
-====
-The location attribute (on propertyPlaceholder tag) is not mandatory
-====
-
 Here we have a Camel XML route where we have defined the
-`<propertyPlaceholder>` to use a custom function, which we refer to be the
-bean id - eg the `beerFunction`. As the beer function uses `"beer"` as its
-name, then the placeholder syntax can trigger the beer function by
-starting with `beer:value`.
+`<propertyPlaceholder>` to use a custom function, which we refer to be the bean id - eg the `beerFunction`.
+As the beer function uses `"beer"` as its name, then the placeholder syntax can trigger the beer function by starting with `beer:value`.
 
 The implementation of the function is only two methods as shown below:
 
@@ -916,48 +299,73 @@ public static final class MyBeerFunction implements PropertiesFunction {
 }
 ----
 
-The function must implement
-the `org.apache.camel.component.properties.PropertiesFunction`
-interface. The method `getName` is  the name of the function, eg beer.
-And the `apply` method is where we implement the custom logic to do. As
-the sample code is from an unit test, it just returns a value to refer
-to a mock endpoint.
+The function must implement the `org.apache.camel.spi.PropertiesFunction` interface.
+The method `getName` is the name of the function, eg beer.
+And the `apply` method is where we implement the custom logic to do.
+As the sample code is from an unit test, it just returns a value to refer to a mock endpoint.
 
 To register a custom function from Java code is as shown below:
 
 [source,java]
 ----
-PropertiesComponent pc = (org.apache.camel.componennt.properties.PropertiesComponent) context.getPropertiesComponent();
+PropertiesComponent pc = context.getPropertiesComponent();
 pc.addFunction(new MyBeerFunction());
 ----
 
+== PropertySource
+
+The regular `PropertySource` will lookup the property on-demand, for example to lookup values from a backend source such as a database or HashiCorp Vault etc.
+
+=== LoadablePropertySource
+
+A `PropertySource` can define that it supports loading all its properties from the source at once, for example from file system.
+This allows Camel properties component to load these properties at once during startup.
 
-== Using 3rd-party properties sources
+=== Using 3rd-party PropertySource
 
 The properties component allows to plugin 3rd party sources to load and lookup properties via the `PropertySource`
-API from camel-api. For example the `camel-microprofile-config` component is implemented using this.
-The 3rd-party `PropertySource` can automatic be discoverd from classpath when Camel is starting up.
-This is done by include the file `META-INF/services/org/apache/camel/property-source-factory` file
-which refers to the fully qualified class name of the `PropertySource` implementation.
-See the `camel-microprofile-config` for an example.
+API from camel-api.
+
+For example the `camel-microprofile-config` component is implemented using this.
+The 3rd-party `PropertySource` can automatic be discovered from classpath when Camel is starting up.
+This is done by include the file `META-INF/services/org/apache/camel/property-source-factory` file which refers to the fully qualified class name of the `PropertySource` implementation.
+
+See xref:components:others:microprofile-config.adoc[MicroProfile Config] component as an example.
 
-You can also register 3rd-part property sources via Java API
+You can also register 3rd-party property sources via Java API:
 
 [source,java]
 ----
-PropertiesComponent pc = ...
+PropertiesComponent pc = context.getPropertiesComponent();
 pc.addPropertySource(myPropertySource);
 ----
 
-=== LoadablePropertySource
-
-A `PropertySource` can define that it supports loading all its properties from the source at once,
-for example from file system. This allows Camel properties component to load these properties at once
-during startup.
 
-=== PropertySource
-
-The regular `PropertySource` will lookup the property on-demand, for example to lookup
-values from a backend source such as a database or HashiCorp Vault etc.
+== Spring Boot Auto-Configuration
 
+The component supports 10 options, which are listed below.
 
+[width="100%",cols="2,5,^1,2",options="header"]
+|===
+| Name | Description | Default | Type
+| *camel.component.properties.auto-discover-properties-sources* | Whether to automatically discovery instances of PropertiesSource from registry and service factory. | true | Boolean
+| *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.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 (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
+| *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.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
+|===
diff --git a/core/camel-base/src/main/docs/properties-component.adoc b/core/camel-base/src/main/docs/properties-component.adoc
index cb2ec73..9115aa0 100644
--- a/core/camel-base/src/main/docs/properties-component.adoc
+++ b/core/camel-base/src/main/docs/properties-component.adoc
@@ -10,99 +10,27 @@
 *Since Camel {since}*
 
 The properties component is used for property placeholders in your Camel application, such as endpoint URIs.
-It is *not* a regular Camel component with producer and consumer for routing messages. However for historical
-reasons it was named `PropertiesComponent` and this name is commonly known and therfore we keep using it.
+It is *not* a regular Camel component with producer and consumer for routing messages.
+However, for historical reasons it was named `PropertiesComponent` and this name is commonly known so we keep using it.
 
-== Spring Boot Auto-Configuration
-
-The component supports 10 options, which are listed below.
-
-
-
-[width="100%",cols="2,5,^1,2",options="header"]
-|===
-| Name | Description | Default | Type
-| *camel.component.properties.auto-discover-properties-sources* | Whether to automatically discovery instances of PropertiesSource from registry and service factory. | true | Boolean
-| *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.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 (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
-| *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.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
-|===
-
-[TIP]
-**Resolving property from Java code** +
-You can use the method `resolveProperty` on the `PropertiesComponent` to resolve a property from Java code.
-Or use the method `resolvePropertyPlaceholders` on the `CamelContext` to resolve property placeholders in a string.
-
-== Using PropertyPlaceholder
-
-Camel now provides a new `PropertiesComponent` in *camel-core* which
-allows you to use property placeholders when defining Camel
-Endpoint URIs.
-
-This works much like you would do if using Spring's
-`<property-placeholder>` tag. However Spring have a limitation which
-prevents 3rd party frameworks to leverage Spring property placeholders
-to the fullest. See more at
-xref:manual:faq:how-do-i-use-spring-property-placeholder-with-camel-xml.adoc[How do
-I use Spring Property Placeholder with Camel XML].
+IMPORTANT: See the xref:latest@manual:ROOT:using-propertyplaceholder[Property Placeholder] documentation for general information on using property placeholders in Camel.
 
-[TIP]
-**Bridging Spring and Camel property placeholders** +
-You can bridge the Spring property placeholder
-with Camel, see further below for more details.
+The properties component requires to load the properties (key=value pairs) from an external source such as `.properties` files.
+The component is pluggable and you can configure to use other sources or write a custom implementation (for example to load from a database).
 
-The property placeholder is generally in use when doing:
 
-* lookup or creating endpoints
-* lookup of beans in the Registry
-* additional supported in Spring XML (see below in examples)
-* using Blueprint PropertyPlaceholder with Camel
-xref:properties-component.adoc[Properties] component
-* using `@PropertyInject` to inject a property in a POJO
-* Using default value if a property does not exists
-* Include out of the box functions, to lookup property
-values from OS environment variables, JVM system properties, or the
-service idiom.
-* Using custom functions, which can be plugged into the
-property component.
+== Defining location of properties files
 
-== 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.
-
-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).
-
-[NOTE]
-====
-Do not use colon in the property key. The colon is used as a separator
-token when you are providing a default value.
-====
-
-== Defining location
-
-The properties component needs to know a location(s) where to resolve the
-properties. You can define 1 to many locations. If you define the
-location in a single String property you can separate multiple locations
-with comma such as:
+The properties component needs to know a location(s) where to resolve the properties.
+You can define one to many locations.
+Multiple locations can be separated by comma such as:
 
 [source,java]
 ----
 pc.setLocation("com/mycompany/myprop.properties,com/mycompany/other.properties");
 ----
 
-You can set which location can be discarded if missing by by setting the ``optional`` attribute, which is false by default, i.e:
+You can mark a location to be optional, which means that Camel will ignore the location if not present:
 
 [source,java]
 ----
@@ -111,10 +39,9 @@ pc.setLocations(
     "com/mycompany/defaults.properties");
 ----
 
-== Using system and environment variables in locations
+=== Using system and environment variables in locations
 
-The location now supports using placeholders for JVM system properties
-and OS environments variables.
+The location now supports using placeholders for JVM system properties and OS environments variables.
 
 For example:
 
@@ -123,11 +50,11 @@ For example:
 location=file:${karaf.home}/etc/foo.properties
 ----
 
-In the location above we defined a location using the file scheme using
-the JVM system property with key `karaf.home`.
+In the location above we defined a location using the file scheme using the JVM system property with key `karaf.home`.
 
 To use an OS environment variable instead you would have to prefix with
-`env:`. You can also prefix with `env.`, however this style is not recommended because all the other functions use colon.
+`env:`.
+You can also prefix with `env.`, however this style is not recommended because all the other functions use colon.
 
 [source]
 ----
@@ -138,9 +65,8 @@ Where `APP_HOME` is an OS environment.
 
 [NOTE]
 ====
-Some OS'es (such as Linux) do not support dashes in environment variable names,
-so here we are using `APP_HOME`. But if you specify `APP-HOME` then Camel 3 will automatic lookup
-the value as `APP_HOME` (with underscore) as fallback.
+Some OS'es (such as Linux) do not support dashes in environment variable names, so here we are using `APP_HOME`.
+But if you specify `APP-HOME` then Camel 3 will automatic lookup the value as `APP_HOME` (with underscore) as fallback.
 ====
 
 You can have multiple placeholders in the same location, such as:
@@ -150,22 +76,11 @@ You can have multiple placeholders in the same location, such as:
 location=file:${env:APP_HOME}/etc/${prop.name}.properties
 ----
 
-== Configuring in Java DSL
-
-You have to create and register the `PropertiesComponent` under the name
-`properties` such as:
-
-[source,java]
-----
-PropertiesComponent pc = camelContext.getPropertiesComponent();
-pc.setLocation("classpath:com/mycompany/myprop.properties");
-----
-
-== Configuring in Spring XML
+=== Defining location of properties files in Spring XML
 
-Spring XML offers two variations to configure. You can define a spring
-bean as a `PropertiesComponent` which resembles the way done in Java
-DSL. Or you can use the `<propertyPlaceholder>` tag.
+Spring XML offers two variations to configure.
+You can define a spring bean as a `PropertiesComponent` which resembles the way done in Java.
+Or you can use the `<propertyPlaceholder>` tag.
 
 [source,xml]
 ----
@@ -174,21 +89,20 @@ DSL. Or you can use the `<propertyPlaceholder>` tag.
 </bean>
 ----
 
-Using the `<propertyPlaceholder>` tag makes the configuration a bit more
-fresh such as:
+Using the `<propertyPlaceholder>` allows to configure this within the `<camelContext>` tag.
 
 [source,xml]
 ----
-<camelContext ...>
+<camelContext>
    <propertyPlaceholder id="properties" location="com/mycompany/myprop.properties"/>
 </camelContext>
 ----
 
-Setting the properties location through the location tag works just fine but sometime you have a number of resources to take into account and starting from *Camel 2.19.0* you can set the properties location with a dedicated propertiesLocation:
+For fine grained configuration of the location, then this can be done as follows:
 
 [source,xml]
 ----
-<camelContext ...>
+<camelContext>
   <propertyPlaceholder id="myPropertyPlaceholder">
     <propertiesLocation
       resolver = "classpath"
@@ -206,134 +120,9 @@ Setting the properties location through the location tag works just fine but som
 </camelContext>
 ----
 
-[TIP]
-**Specifying the cache option inside XML** +
-Camel supports specifying a value for the cache option both
-inside the Spring as well as the Blueprint XML.
-
-== Using a Properties from the Registry
-
-For example in OSGi you may want to expose a service which returns the
-properties as a `java.util.Properties` object.
-
-Then you could setup the xref:properties-component.adoc[Properties] component as
-follows:
-
-[source,xml]
-----
- <propertyPlaceholder id="properties" location="ref:myProperties"/>
-----
-
-Where `myProperties` is the id to use for lookup in the OSGi registry.
-Notice we use the `ref:` prefix to tell Camel that it should lookup the
-properties for the Registry.
-
-== Examples using properties component
-
-When using property placeholders in the endpoint URIs you can either use
-the `properties:` component or define the placeholders directly in the
-URI. We will show example of both cases, starting with the former.
-
-[source,java]
-----
-// properties
-cool.end=mock:result
-
-// route
-from("direct:start").to("{{cool.end}}");
-----
-
-You can also use placeholders as a part of the endpoint uri:
-
-[source,java]
-----
-// properties
-cool.foo=result
-
-// route
-from("direct:start").to("mock:{{cool.foo}}");
-----
-
-In the example above the to endpoint will be resolved to `mock:result`.
-
-You can also have properties with refer to each other such as:
-
-[source,java]
-----
-// properties
-cool.foo=result
-cool.concat=mock:{{cool.foo}}
-
-// route
-from("direct:start").to("mock:{{cool.concat}}");
-----
-
-Notice how `cool.concat` refer to another property.
-
-And you can use placeholders several times:
-
-[source,java]
-----
-// properties
-cool.start=direct:start
-cool.showid=true
-cool.result=result
-
-// route
-from("{{cool.start}}")
-    .to("log:{{cool.start}}?showBodyType=false&showExchangeId={{cool.showid}}")
-    .to("mock:{{cool.result}}");
-----
-
-You can also your property placeholders when using
-ProducerTemplate for example:
-
-[source,java]
-----
-template.sendBody("{{cool.start}}", "Hello World");
-----
-
-== Example with xref:languages:simple-language.adoc[Simple] language
-
-The xref:languages:simple-language.adoc[Simple] language now also support using property
-placeholders, for example in the route below:
-
-[source,java]
-----
-// properties
-cheese.quote=Camel rocks
-
-// route
-from("direct:start")
-    .transform().simple("Hi ${body} do you think ${properties:cheese.quote}?");
-----
-
-== Negate boolean value
-
-If a property placeholder is a boolean value, then it is possible to negate (reverse) the value by using `!` as prefix in the key.
-
-[source,java]
-----
-// properties
-integration.ftpEnabled=true
-
-// route
-from("ftp:....").autoStartup("{{integration.ftpEnabled}}")
-    .to("kafka:cheese")
-
-from("jms:....").autoStartup("{{!integration.ftpEnabled}}")
-    .to("kafka:cheese")
-----
-
-In the example above then the FTP route or the JMS route should only be started. So if the FTP is enabled then JMS should be disable, and vise-versa.
-We can do this be negating the `autoStartup` in the JMS route, by using `!integration.ftpEnabled` as the key.
-
 == Additional property placeholder supported in Spring XML
 
-The property placeholders is also supported in many of the Camel Spring
-XML tags such as
-`<package>, <packageScan>, <contextScan>, <jmxAgent>, <endpoint>, <routeBuilder>,
-and the others.
+The property placeholders is also supported in many of the Camel Spring XML tags such as `<package>, <packageScan>, <contextScan>, <jmxAgent>, <endpoint>, <routeBuilder>, and the others.
 
 The example below has property placeholder in the `<jmxAgent>` tag:
 
@@ -352,8 +141,7 @@ The example below has property placeholder in the `<jmxAgent>` tag:
 </camelContext>
 ----
 
-You can also define property placeholders in the various attributes on
-the `<camelContext>` tag such as `trace` as shown here:
+You can also define property placeholders in the various attributes on the `<camelContext>` tag such as `trace` as shown here:
 
 [source,xml]
 ----
@@ -372,8 +160,7 @@ the `<camelContext>` tag such as `trace` as shown here:
 
 == Using JVM system properties or Environment variables as override or fallback values
 
-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 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 both of them are in override mode, and they are check in the following order:
 
@@ -388,445 +175,51 @@ 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
-
-In the example below we use the `prop` prefix for the namespace
-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
-in the Multicast to indicate that the option
-`stopOnException` should be the value of the placeholder with the key
-"stop".
-
-In our properties file we have the value defined as
-
-[source]
-----
-stop=true
-----
-
-== Using Blueprint property placeholder with Camel routes
-
-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
-OSGi Blueprint property placeholder in the XML file as shown below:
-
-[source,xml]
-----
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
-           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
-           xsi:schemaLocation="
-           http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
-
-    <!-- OSGI blueprint property placeholder -->
-    <cm:property-placeholder id="myblueprint.placeholder" persistent-id="camel.blueprint">
-        <!-- list some properties as needed -->
-        <cm:default-properties>
-            <cm:property name="result" value="mock:result"/>
-        </cm:default-properties>
-    </cm:property-placeholder>
-
-    <camelContext xmlns="http://camel.apache.org/schema/blueprint">
-        <!-- in the route we can use {{ }} placeholders which will lookup in blueprint
-             as Camel will auto detect the OSGi blueprint property placeholder and use it -->
-        <route>
-            <from uri="direct:start"/>
-            <to uri="mock:foo"/>
-            <to uri="{{result}}"/>
-        </route>
-    </camelContext>
-</blueprint>
-----
-
-=== Using OSGi blueprint property placeholders in Camel routes
-
-By default Camel detects and uses OSGi blueprint property placeholder
-service. You can disable this by setting the attribute
-`useBlueprintPropertyResolver` to false on the `<camelContext>`
-definition.
-
-=== About placeholder syntax
-
-Notice how we can use the Camel syntax for placeholders `{{` and `}}` in the
-Camel route, which will lookup the value from OSGi blueprint.
-
-The blueprint syntax for placeholders is `${ }`. So outside the
-`<camelContext>` you must use the `${ }` syntax. Where as inside
-`<camelContext>` you must use `{{` and `}}` syntax.
-
-OSGi blueprint allows you to configure the syntax, so you can actually
-align those if you want.
-
-You can also explicit refer to a specific OSGi blueprint property
-placeholder by its id. For that you need to use the Camel's
-`<propertyPlaceholder>` as shown in the example below:
-
-[source,xml]
-----
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
-           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
-           xsi:schemaLocation="
-           http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
-
-    <!-- OSGI blueprint property placeholder -->
-    <cm:property-placeholder id="myblueprint.placeholder" persistent-id="camel.blueprint">
-        <!-- list some properties as needed -->
-        <cm:default-properties>
-            <cm:property name="prefix.result" value="mock:result"/>
-        </cm:default-properties>
-    </cm:property-placeholder>
-
-    <camelContext xmlns="http://camel.apache.org/schema/blueprint">
-        <!-- using Camel properties component and refer to the blueprint property placeholder by its id -->
-        <propertyPlaceholder id="properties" location="blueprint:myblueprint.placeholder"/>
-
-        <!-- in the route we can use {{ }} placeholders which will lookup in blueprint -->
-        <route>
-            <from uri="direct:start"/>
-            <to uri="mock:foo"/>
-            <to uri="{{prefix.result}}"/>
-        </route>
-    </camelContext>
-</blueprint>
-----
-
-
-== Explicit referring to a OSGi blueprint placeholder in Camel
-
-Notice how we use the `blueprint` scheme to refer to the OSGi blueprint
-placeholder by its id. This allows you to mix and match, for example you
-can also have additional schemes in the location. For example to load a
-file from the classpath you can do:
-
-[source]
-----
-location="blueprint:myblueprint.placeholder,classpath:myproperties.properties"
-----
-
-Each location is separated by comma.
-
-== Overriding Blueprint property placeholders outside CamelContext
-
-When using Blueprint property placeholder in the Blueprint XML file, you
-can declare the properties directly in the XML file as shown below:
-
-[source,xml]
-----
-<!-- blueprint property placeholders -->
-<cm:property-placeholder persistent-id="my-placeholders" update-strategy="reload">
-  <cm:default-properties>
-    <cm:property name="greeting" value="Hello"/>
-    <cm:property name="destination" value="mock:result"/>
-  </cm:default-properties>
-</cm:property-placeholder>
-
-<!-- a bean that uses a blueprint property placeholder -->
-<bean id="myCoolBean" class="org.apache.camel.test.blueprint.MyCoolBean">
-  <property name="say" value="${greeting}"/>
-</bean>
-
-<camelContext xmlns="http://camel.apache.org/schema/blueprint">
-
-  <route>
-    <from uri="direct:start"/>
-    <bean ref="myCoolBean" method="saySomething"/>
-    <to uri="{{destination}}"/>
-  </route>
-
-</camelContext>
-----
-
-Notice that we have a `<bean>` which refers to one of the properties. And
-in the Camel route we refer to the other using the `{{` and `}}` notation.
-
-Now if you want to override these Blueprint properties from an unit
-test, you can do this as shown below:
-
-[source,java]
-----
-protected String useOverridePropertiesWithConfigAdmin(Dictionary props) {
-    // add the properties we want to override
-    props.put("greeting", "Bye");
-
-    // return the PID of the config-admin we are using in the blueprint xml file
-    return "my-placeholders";
-}
-----
-
-To do this we override and implement the
-`useOverridePropertiesWithConfigAdmin` method. We can then put the
-properties we want to override on the given props parameter. And the
-return value *must* be the `persistence-id` of the
-`<cm:property-placeholder>` tag, which you define in the blueprint XML
-file.
-
-== Using .cfg or .properties file for Blueprint property placeholders
-
-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
-loads the properties from a file in the etc directory with the naming
-`etc/pid.cfg`, where `pid` is the `persistence-id`.
-
-For example in the blueprint XML file we have the
-`persistence-id="stuff"`, which mean it will load the configuration file
-as `etc/stuff.cfg`.
-
-Now if you want to unit test this blueprint XML file, then you can
-override the `loadConfigAdminConfigurationFile` and tell Camel which
-file to load as shown below:
-
-[source,java]
-----
-@Override
-protected String[] loadConfigAdminConfigurationFile() {
-    // String[0] = tell Camel the path of the .cfg file to use for OSGi ConfigAdmin in the blueprint XML file
-    // String[1] = tell Camel the persistence-id of the cm:property-placeholder in the blueprint XML file
-    return new String[]{"src/test/resources/etc/stuff.cfg", "stuff"};
-}
-----
-
-Notice that this method requires to return a `String[]` with 2 values. The
-1st value is the path for the configuration file to load.
-The 2nd value is the `persistence-id` of the `<cm:property-placeholder>`
-tag.
-
-The `stuff.cfg` file is just a plain properties file with the property
-placeholders such as:
-
-[source]
-----
-== this is a comment
-greeting=Bye
-----
-
-== Using .cfg file and overriding properties for Blueprint property placeholders
-
-You can do both as well. Here is a complete example. First we have the
-Blueprint XML file:
-
-And in the unit test class we do as follows:
-
-And the `etc/stuff.cfg` configuration file contains
-
-[source]
-----
-greeting=Bye
-echo=Yay
-destination=mock:result
-----
-
-== Bridging Spring and Camel property placeholders
-
-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
-bean with the type
-`org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer`, which
-is a Spring
-`org.springframework.beans.factory.config.PropertyPlaceholderConfigurer`
-type.
-
-To bridge Spring and Camel you must define a single bean as shown below:
-
-[source,xml]
-----
-  <!-- bridge spring property placeholder with Camel -->
-  <!-- you must NOT use the <context:property-placeholder at the same time, only this bridge bean -->
-  <bean id="bridgePropertyPlaceholder" class="org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer">
-    <property name="location" value="classpath:org/apache/camel/component/properties/cheese.properties"/>
-  </bean>
-----
-
-You *must not* use the spring `<context:property-placeholder>` namespace
-at the same time; this is not possible.
-
-After declaring this bean, you can define property placeholders using
-both the Spring style, and the Camel style within the `<camelContext>` tag
-as shown below:
-
-[source,xml]
-----
-  <!-- a bean that uses Spring property placeholder -->
-  <!-- the ${hi} is a spring property placeholder -->
-  <bean id="hello" class="org.apache.camel.component.properties.HelloBean">
-    <property name="greeting" value="${hi}"/>
-  </bean>
-
-  <camelContext xmlns="http://camel.apache.org/schema/spring">
-    <!-- in this route we use Camels property placeholder {{ }} style -->
-    <route>
-      <from uri="direct:{{cool.bar}}"/>
-      <bean ref="hello"/>
-      <to uri="{{cool.end}}"/>
-    </route>
-  </camelContext>
-----
-
-Notice how the hello bean is using pure Spring property placeholders
-using the `${ }` notation. And in the Camel routes we use the Camel
-placeholder notation with `{{` and `}}`.
-
-== Clashing Spring property placeholders with Camels Simple language
-
-Take notice when using Spring bridging placeholder then the spring `${ }`
-syntax clashes with the xref:languages:simple-language.adoc[Simple] in Camel, and therefore
-take care. For example:
-
-[source,xml]
-----
-<setHeader name="Exchange.FILE_NAME">
-  <simple>{{file.rootdir}}/${in.header.CamelFileName}</simple>
-</setHeader>
-----
-
-clashes with Spring property placeholders, and you should use `$simple{ }`
-to indicate using the xref:languages:simple-language.adoc[Simple] language in Camel.
-
-[source,xml]
-----
-<setHeader name="Exchange.FILE_NAME">
-  <simple>{{file.rootdir}}/$simple{in.header.CamelFileName}</simple>
-</setHeader>
-----
-
-An alternative is to configure the `PropertyPlaceholderConfigurer` with
-`ignoreUnresolvablePlaceholders` option to `true`.
-
-== Overriding properties from Camel test kit
-
-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
-source code. +
-Camel test kits, eg `CamelTestSupport` class offers the following methods
-
-* `useOverridePropertiesWithPropertiesComponent`
-* `ignoreMissingLocationWithPropertiesComponent`
-
-So for example in your unit test classes, you can override the
-`useOverridePropertiesWithPropertiesComponent` method and return a
-`java.util.Properties` that contains the properties which should be
-preferred to be used.
-
-=== Providing properties from within unit test source
-
-This can be done from any of the Camel Test kits, such as camel-test,
-camel-test-spring, and camel-test-blueprint.
-
-The `ignoreMissingLocationWithPropertiesComponent` can be used to
-instruct Camel to ignore any locations which was not discoverable, for
-example if you run the unit test, in an environment that does not have
-access to the location of the properties.
-
-== Using @PropertyInject
-
-Camel allows to inject property placeholders in POJOs using the
-`@PropertyInject` annotation which can be set on fields and setter
-methods.
-
-For example you can use that with `RouteBuilder` classes, such as shown
-below:
-
-[source,java]
-----
-public class MyRouteBuilder extends RouteBuilder {
-
-    @PropertyInject("hello")
-    private String greeting;
-
-    @Override
-    public void configure() throws Exception {
-        from("direct:start")
-            .transform().constant(greeting)
-            .to("{{result}}");
-    }
-
-}
-----
-
-Notice we have annotated the greeting field with `@PropertyInject` and
-define it to use the key `"hello"`. Camel will then lookup the property
-with this key and inject its value, converted to a String type.
-
-You can also use multiple placeholders and text in the key, for example
-we can do:
-
-[source,java]
-----
-@PropertyInject("Hello {{name}} how are you?")
-private String greeting;
-----
-
-This will lookup the placeholder with they key `"name"`.
-
-You can also add a default value if the key does not exists, such as:
-
-[source,java]
-----
-@PropertyInject(value = "myTimeout", defaultValue = "5000")
-private int timeout;
-----
 
 == Using out of the box functions
 
-The xref:properties-component.adoc[Properties] component includes the following
-functions out of the box
+The xref:properties-component.adoc[Properties] component includes the following functions out of the box:
 
 * `env` - A function to lookup the property from OS environment variables
-* `sys` - A function to lookup the property from Java JVM system
-properties
-* `service` - A function to lookup the property from OS environment
-variables using the service naming idiom
-* `service.name` - A function to lookup the
-property from OS environment variables using the service naming idiom
-returning the hostname part only
-* `service.port` - A function to lookup the
-property from OS environment variables using the service naming idiom
-returning the port part only
-
-As you can see these functions is intended to make it easy to lookup
-values from the environment. As they are provided out of the box, they
-can easily be used as shown below:
+* `sys` - A function to lookup the property from Java JVM system properties
+* `service` - A function to lookup the property from OS environment variables using the service naming idiom
+* `service.name` - A function to lookup the property from OS environment variables using the service naming idiom returning the hostname part only
+* `service.port` - A function to lookup the property from OS environment variables using the service naming idiom returning the port part only
+
+As you can see these functions is intended to make it easy to lookup values from the environment.
+As they are provided out of the box, they can easily be used as shown below:
 
 [source,xml]
 ----
   <camelContext xmlns="http://camel.apache.org/schema/blueprint">
     <route>
       <from uri="direct:start"/>
-      <to uri="{`{env:SOMENAME}`}"/>
-      <to uri="{`{sys:MyJvmPropertyName}`}"/>
+      <to uri="{{env:SOMENAME}}"/>
+      <to uri="{{sys:MyJvmPropertyName}}"/>
     </route>
   </camelContext>
 ----
 
-You can use default values as well, so if the property does not exists,
-you can define a default value as shown below, where the default value
-is a `log:foo` and `log:bar` value.
+You can use default values as well, so if the property does not exist, you can define a default value as shown below, where the default value is a `log:foo` and `log:bar` value.
 
 [source,xml]
 ----
   <camelContext xmlns="http://camel.apache.org/schema/blueprint">
     <route>
       <from uri="direct:start"/>
-      <to uri="{`{env:SOMENAME:log:foo}`}"/>
-      <to uri="{`{sys:MyJvmPropertyName:log:bar}`}"/>
+      <to uri="{{env:SOMENAME:log:foo}}"/>
+      <to uri="{{sys:MyJvmPropertyName:log:bar}}"/>
     </route>
   </camelContext>
 ----
 
-The service function is for looking up a service which is defined using
-OS environment variables using the service naming idiom, to refer to a
-service location using `hostname : port`
+The service function is for looking up a service which is defined using OS environment variables using the service naming idiom, to refer to a service location using `hostname : port`
 
 * __NAME__**_SERVICE_HOST**
 * __NAME__**_SERVICE_PORT**
 
-in other words the service uses `_SERVICE_HOST` and `_SERVICE_PORT` as
-prefix. So if the service is named FOO, then the OS environment
-variables should be set as
+in other words the service uses `_SERVICE_HOST` and `_SERVICE_PORT` as prefix.
+So if the service is named FOO, then the OS environment variables should be set as
 
 [source]
 ----
@@ -834,9 +227,7 @@ export $FOO_SERVICE_HOST=myserver
 export $FOO_SERVICE_PORT=8888
 ----
 
-For example if the FOO service a remote HTTP service, then we can refer
-to the service in the Camel endpoint uri, and use
-the HTTP component to make the HTTP call:
+For example if the FOO service a remote HTTP service, then we can refer to the service in the Camel endpoint uri, and use the HTTP component to make the HTTP call:
 
 [source,xml]
 ----
@@ -848,8 +239,7 @@ the HTTP component to make the HTTP call:
 </camelContext>
 ----
 
-And we can use default values if the service has not been defined, for
-example to call a service on localhost, maybe for unit testing etc
+And we can use default values if the service has not been defined, for example to call a service on localhost, maybe for unit testing etc
 
 [source,xml]
 ----
@@ -863,40 +253,33 @@ example to call a service on localhost, maybe for unit testing etc
 
 == Using custom functions (advanced)
 
-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
-placeholders, such as looking up in databases, do custom computations,
-or whatnot. The name of the function becomes the prefix used in the
-placeholder. This is best illustrated in the example code below
+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 placeholders, such as looking up in databases, do custom computations, or whatnot.
+The name of the function becomes the prefix used in the placeholder.
+This is best illustrated in the example code below
 
 [source,xml]
 ----
-<bean id="beerFunction" class="MyBeerFunction"/>
+<beans>
+    <bean id="beerFunction" class="MyBeerFunction"/>
 
-<camelContext xmlns="http://camel.apache.org/schema/blueprint">
-  <propertyPlaceholder id="properties">
-    <propertiesFunction ref="beerFunction"/>
-  </propertyPlaceholder>
+    <camelContext>
+      <propertyPlaceholder id="properties">
+        <propertiesFunction ref="beerFunction"/>
+      </propertyPlaceholder>
 
-  <route>
-    <from uri="direct:start"/>
-    <to uri="{`{beer:FOO}`}"/>
-    <to uri="{`{beer:BAR}`}"/>
-  </route>
-</camelContext>
+      <route>
+        <from uri="direct:start"/>
+        <to uri="{{beer:FOO}}"/>
+        <to uri="{{beer:BAR}}"/>
+      </route>
+    </camelContext>
+</beans>
 ----
 
-[NOTE]
-====
-The location attribute (on propertyPlaceholder tag) is not mandatory
-====
-
 Here we have a Camel XML route where we have defined the
-`<propertyPlaceholder>` to use a custom function, which we refer to be the
-bean id - eg the `beerFunction`. As the beer function uses `"beer"` as its
-name, then the placeholder syntax can trigger the beer function by
-starting with `beer:value`.
+`<propertyPlaceholder>` to use a custom function, which we refer to be the bean id - eg the `beerFunction`.
+As the beer function uses `"beer"` as its name, then the placeholder syntax can trigger the beer function by starting with `beer:value`.
 
 The implementation of the function is only two methods as shown below:
 
@@ -916,48 +299,73 @@ public static final class MyBeerFunction implements PropertiesFunction {
 }
 ----
 
-The function must implement
-the `org.apache.camel.component.properties.PropertiesFunction`
-interface. The method `getName` is  the name of the function, eg beer.
-And the `apply` method is where we implement the custom logic to do. As
-the sample code is from an unit test, it just returns a value to refer
-to a mock endpoint.
+The function must implement the `org.apache.camel.spi.PropertiesFunction` interface.
+The method `getName` is the name of the function, eg beer.
+And the `apply` method is where we implement the custom logic to do.
+As the sample code is from an unit test, it just returns a value to refer to a mock endpoint.
 
 To register a custom function from Java code is as shown below:
 
 [source,java]
 ----
-PropertiesComponent pc = (org.apache.camel.componennt.properties.PropertiesComponent) context.getPropertiesComponent();
+PropertiesComponent pc = context.getPropertiesComponent();
 pc.addFunction(new MyBeerFunction());
 ----
 
+== PropertySource
+
+The regular `PropertySource` will lookup the property on-demand, for example to lookup values from a backend source such as a database or HashiCorp Vault etc.
+
+=== LoadablePropertySource
+
+A `PropertySource` can define that it supports loading all its properties from the source at once, for example from file system.
+This allows Camel properties component to load these properties at once during startup.
 
-== Using 3rd-party properties sources
+=== Using 3rd-party PropertySource
 
 The properties component allows to plugin 3rd party sources to load and lookup properties via the `PropertySource`
-API from camel-api. For example the `camel-microprofile-config` component is implemented using this.
-The 3rd-party `PropertySource` can automatic be discoverd from classpath when Camel is starting up.
-This is done by include the file `META-INF/services/org/apache/camel/property-source-factory` file
-which refers to the fully qualified class name of the `PropertySource` implementation.
-See the `camel-microprofile-config` for an example.
+API from camel-api.
+
+For example the `camel-microprofile-config` component is implemented using this.
+The 3rd-party `PropertySource` can automatic be discovered from classpath when Camel is starting up.
+This is done by include the file `META-INF/services/org/apache/camel/property-source-factory` file which refers to the fully qualified class name of the `PropertySource` implementation.
+
+See xref:components:others:microprofile-config.adoc[MicroProfile Config] component as an example.
 
-You can also register 3rd-part property sources via Java API
+You can also register 3rd-party property sources via Java API:
 
 [source,java]
 ----
-PropertiesComponent pc = ...
+PropertiesComponent pc = context.getPropertiesComponent();
 pc.addPropertySource(myPropertySource);
 ----
 
-=== LoadablePropertySource
-
-A `PropertySource` can define that it supports loading all its properties from the source at once,
-for example from file system. This allows Camel properties component to load these properties at once
-during startup.
 
-=== PropertySource
-
-The regular `PropertySource` will lookup the property on-demand, for example to lookup
-values from a backend source such as a database or HashiCorp Vault etc.
+== Spring Boot Auto-Configuration
 
+The component supports 10 options, which are listed below.
 
+[width="100%",cols="2,5,^1,2",options="header"]
+|===
+| Name | Description | Default | Type
+| *camel.component.properties.auto-discover-properties-sources* | Whether to automatically discovery instances of PropertiesSource from registry and service factory. | true | Boolean
+| *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.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 (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
+| *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.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
+|===
diff --git a/docs/components/modules/ROOT/pages/properties-component.adoc b/docs/components/modules/ROOT/pages/properties-component.adoc
index 1d55566..6b3aaac 100644
--- a/docs/components/modules/ROOT/pages/properties-component.adoc
+++ b/docs/components/modules/ROOT/pages/properties-component.adoc
@@ -12,99 +12,27 @@
 *Since Camel {since}*
 
 The properties component is used for property placeholders in your Camel application, such as endpoint URIs.
-It is *not* a regular Camel component with producer and consumer for routing messages. However for historical
-reasons it was named `PropertiesComponent` and this name is commonly known and therfore we keep using it.
+It is *not* a regular Camel component with producer and consumer for routing messages.
+However, for historical reasons it was named `PropertiesComponent` and this name is commonly known so we keep using it.
 
-== Spring Boot Auto-Configuration
-
-The component supports 10 options, which are listed below.
-
-
-
-[width="100%",cols="2,5,^1,2",options="header"]
-|===
-| Name | Description | Default | Type
-| *camel.component.properties.auto-discover-properties-sources* | Whether to automatically discovery instances of PropertiesSource from registry and service factory. | true | Boolean
-| *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.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 (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
-| *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.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
-|===
-
-[TIP]
-**Resolving property from Java code** +
-You can use the method `resolveProperty` on the `PropertiesComponent` to resolve a property from Java code.
-Or use the method `resolvePropertyPlaceholders` on the `CamelContext` to resolve property placeholders in a string.
-
-== Using PropertyPlaceholder
-
-Camel now provides a new `PropertiesComponent` in *camel-core* which
-allows you to use property placeholders when defining Camel
-Endpoint URIs.
-
-This works much like you would do if using Spring's
-`<property-placeholder>` tag. However Spring have a limitation which
-prevents 3rd party frameworks to leverage Spring property placeholders
-to the fullest. See more at
-xref:manual:faq:how-do-i-use-spring-property-placeholder-with-camel-xml.adoc[How do
-I use Spring Property Placeholder with Camel XML].
+IMPORTANT: See the xref:latest@manual:ROOT:using-propertyplaceholder[Property Placeholder] documentation for general information on using property placeholders in Camel.
 
-[TIP]
-**Bridging Spring and Camel property placeholders** +
-You can bridge the Spring property placeholder
-with Camel, see further below for more details.
+The properties component requires to load the properties (key=value pairs) from an external source such as `.properties` files.
+The component is pluggable and you can configure to use other sources or write a custom implementation (for example to load from a database).
 
-The property placeholder is generally in use when doing:
 
-* lookup or creating endpoints
-* lookup of beans in the Registry
-* additional supported in Spring XML (see below in examples)
-* using Blueprint PropertyPlaceholder with Camel
-xref:properties-component.adoc[Properties] component
-* using `@PropertyInject` to inject a property in a POJO
-* Using default value if a property does not exists
-* Include out of the box functions, to lookup property
-values from OS environment variables, JVM system properties, or the
-service idiom.
-* Using custom functions, which can be plugged into the
-property component.
+== Defining location of properties files
 
-== 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.
-
-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).
-
-[NOTE]
-====
-Do not use colon in the property key. The colon is used as a separator
-token when you are providing a default value.
-====
-
-== Defining location
-
-The properties component needs to know a location(s) where to resolve the
-properties. You can define 1 to many locations. If you define the
-location in a single String property you can separate multiple locations
-with comma such as:
+The properties component needs to know a location(s) where to resolve the properties.
+You can define one to many locations.
+Multiple locations can be separated by comma such as:
 
 [source,java]
 ----
 pc.setLocation("com/mycompany/myprop.properties,com/mycompany/other.properties");
 ----
 
-You can set which location can be discarded if missing by by setting the ``optional`` attribute, which is false by default, i.e:
+You can mark a location to be optional, which means that Camel will ignore the location if not present:
 
 [source,java]
 ----
@@ -113,10 +41,9 @@ pc.setLocations(
     "com/mycompany/defaults.properties");
 ----
 
-== Using system and environment variables in locations
+=== Using system and environment variables in locations
 
-The location now supports using placeholders for JVM system properties
-and OS environments variables.
+The location now supports using placeholders for JVM system properties and OS environments variables.
 
 For example:
 
@@ -125,11 +52,11 @@ For example:
 location=file:${karaf.home}/etc/foo.properties
 ----
 
-In the location above we defined a location using the file scheme using
-the JVM system property with key `karaf.home`.
+In the location above we defined a location using the file scheme using the JVM system property with key `karaf.home`.
 
 To use an OS environment variable instead you would have to prefix with
-`env:`. You can also prefix with `env.`, however this style is not recommended because all the other functions use colon.
+`env:`.
+You can also prefix with `env.`, however this style is not recommended because all the other functions use colon.
 
 [source]
 ----
@@ -140,9 +67,8 @@ Where `APP_HOME` is an OS environment.
 
 [NOTE]
 ====
-Some OS'es (such as Linux) do not support dashes in environment variable names,
-so here we are using `APP_HOME`. But if you specify `APP-HOME` then Camel 3 will automatic lookup
-the value as `APP_HOME` (with underscore) as fallback.
+Some OS'es (such as Linux) do not support dashes in environment variable names, so here we are using `APP_HOME`.
+But if you specify `APP-HOME` then Camel 3 will automatic lookup the value as `APP_HOME` (with underscore) as fallback.
 ====
 
 You can have multiple placeholders in the same location, such as:
@@ -152,22 +78,11 @@ You can have multiple placeholders in the same location, such as:
 location=file:${env:APP_HOME}/etc/${prop.name}.properties
 ----
 
-== Configuring in Java DSL
-
-You have to create and register the `PropertiesComponent` under the name
-`properties` such as:
-
-[source,java]
-----
-PropertiesComponent pc = camelContext.getPropertiesComponent();
-pc.setLocation("classpath:com/mycompany/myprop.properties");
-----
-
-== Configuring in Spring XML
+=== Defining location of properties files in Spring XML
 
-Spring XML offers two variations to configure. You can define a spring
-bean as a `PropertiesComponent` which resembles the way done in Java
-DSL. Or you can use the `<propertyPlaceholder>` tag.
+Spring XML offers two variations to configure.
+You can define a spring bean as a `PropertiesComponent` which resembles the way done in Java.
+Or you can use the `<propertyPlaceholder>` tag.
 
 [source,xml]
 ----
@@ -176,21 +91,20 @@ DSL. Or you can use the `<propertyPlaceholder>` tag.
 </bean>
 ----
 
-Using the `<propertyPlaceholder>` tag makes the configuration a bit more
-fresh such as:
+Using the `<propertyPlaceholder>` allows to configure this within the `<camelContext>` tag.
 
 [source,xml]
 ----
-<camelContext ...>
+<camelContext>
    <propertyPlaceholder id="properties" location="com/mycompany/myprop.properties"/>
 </camelContext>
 ----
 
-Setting the properties location through the location tag works just fine but sometime you have a number of resources to take into account and starting from *Camel 2.19.0* you can set the properties location with a dedicated propertiesLocation:
+For fine grained configuration of the location, then this can be done as follows:
 
 [source,xml]
 ----
-<camelContext ...>
+<camelContext>
   <propertyPlaceholder id="myPropertyPlaceholder">
     <propertiesLocation
       resolver = "classpath"
@@ -208,134 +122,9 @@ Setting the properties location through the location tag works just fine but som
 </camelContext>
 ----
 
-[TIP]
-**Specifying the cache option inside XML** +
-Camel supports specifying a value for the cache option both
-inside the Spring as well as the Blueprint XML.
-
-== Using a Properties from the Registry
-
-For example in OSGi you may want to expose a service which returns the
-properties as a `java.util.Properties` object.
-
-Then you could setup the xref:properties-component.adoc[Properties] component as
-follows:
-
-[source,xml]
-----
- <propertyPlaceholder id="properties" location="ref:myProperties"/>
-----
-
-Where `myProperties` is the id to use for lookup in the OSGi registry.
-Notice we use the `ref:` prefix to tell Camel that it should lookup the
-properties for the Registry.
-
-== Examples using properties component
-
-When using property placeholders in the endpoint URIs you can either use
-the `properties:` component or define the placeholders directly in the
-URI. We will show example of both cases, starting with the former.
-
-[source,java]
-----
-// properties
-cool.end=mock:result
-
-// route
-from("direct:start").to("{{cool.end}}");
-----
-
-You can also use placeholders as a part of the endpoint uri:
-
-[source,java]
-----
-// properties
-cool.foo=result
-
-// route
-from("direct:start").to("mock:{{cool.foo}}");
-----
-
-In the example above the to endpoint will be resolved to `mock:result`.
-
-You can also have properties with refer to each other such as:
-
-[source,java]
-----
-// properties
-cool.foo=result
-cool.concat=mock:{{cool.foo}}
-
-// route
-from("direct:start").to("mock:{{cool.concat}}");
-----
-
-Notice how `cool.concat` refer to another property.
-
-And you can use placeholders several times:
-
-[source,java]
-----
-// properties
-cool.start=direct:start
-cool.showid=true
-cool.result=result
-
-// route
-from("{{cool.start}}")
-    .to("log:{{cool.start}}?showBodyType=false&showExchangeId={{cool.showid}}")
-    .to("mock:{{cool.result}}");
-----
-
-You can also your property placeholders when using
-ProducerTemplate for example:
-
-[source,java]
-----
-template.sendBody("{{cool.start}}", "Hello World");
-----
-
-== Example with xref:languages:simple-language.adoc[Simple] language
-
-The xref:languages:simple-language.adoc[Simple] language now also support using property
-placeholders, for example in the route below:
-
-[source,java]
-----
-// properties
-cheese.quote=Camel rocks
-
-// route
-from("direct:start")
-    .transform().simple("Hi ${body} do you think ${properties:cheese.quote}?");
-----
-
-== Negate boolean value
-
-If a property placeholder is a boolean value, then it is possible to negate (reverse) the value by using `!` as prefix in the key.
-
-[source,java]
-----
-// properties
-integration.ftpEnabled=true
-
-// route
-from("ftp:....").autoStartup("{{integration.ftpEnabled}}")
-    .to("kafka:cheese")
-
-from("jms:....").autoStartup("{{!integration.ftpEnabled}}")
-    .to("kafka:cheese")
-----
-
-In the example above then the FTP route or the JMS route should only be started. So if the FTP is enabled then JMS should be disable, and vise-versa.
-We can do this be negating the `autoStartup` in the JMS route, by using `!integration.ftpEnabled` as the key.
-
 == Additional property placeholder supported in Spring XML
 
-The property placeholders is also supported in many of the Camel Spring
-XML tags such as
-`<package>, <packageScan>, <contextScan>, <jmxAgent>, <endpoint>, <routeBuilder>,
-and the others.
+The property placeholders is also supported in many of the Camel Spring XML tags such as `<package>, <packageScan>, <contextScan>, <jmxAgent>, <endpoint>, <routeBuilder>, and the others.
 
 The example below has property placeholder in the `<jmxAgent>` tag:
 
@@ -354,8 +143,7 @@ The example below has property placeholder in the `<jmxAgent>` tag:
 </camelContext>
 ----
 
-You can also define property placeholders in the various attributes on
-the `<camelContext>` tag such as `trace` as shown here:
+You can also define property placeholders in the various attributes on the `<camelContext>` tag such as `trace` as shown here:
 
 [source,xml]
 ----
@@ -374,8 +162,7 @@ the `<camelContext>` tag such as `trace` as shown here:
 
 == Using JVM system properties or Environment variables as override or fallback values
 
-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 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 both of them are in override mode, and they are check in the following order:
 
@@ -390,445 +177,51 @@ 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
-
-In the example below we use the `prop` prefix for the namespace
-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
-in the Multicast to indicate that the option
-`stopOnException` should be the value of the placeholder with the key
-"stop".
-
-In our properties file we have the value defined as
-
-[source]
-----
-stop=true
-----
-
-== Using Blueprint property placeholder with Camel routes
-
-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
-OSGi Blueprint property placeholder in the XML file as shown below:
-
-[source,xml]
-----
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
-           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
-           xsi:schemaLocation="
-           http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
-
-    <!-- OSGI blueprint property placeholder -->
-    <cm:property-placeholder id="myblueprint.placeholder" persistent-id="camel.blueprint">
-        <!-- list some properties as needed -->
-        <cm:default-properties>
-            <cm:property name="result" value="mock:result"/>
-        </cm:default-properties>
-    </cm:property-placeholder>
-
-    <camelContext xmlns="http://camel.apache.org/schema/blueprint">
-        <!-- in the route we can use {{ }} placeholders which will lookup in blueprint
-             as Camel will auto detect the OSGi blueprint property placeholder and use it -->
-        <route>
-            <from uri="direct:start"/>
-            <to uri="mock:foo"/>
-            <to uri="{{result}}"/>
-        </route>
-    </camelContext>
-</blueprint>
-----
-
-=== Using OSGi blueprint property placeholders in Camel routes
-
-By default Camel detects and uses OSGi blueprint property placeholder
-service. You can disable this by setting the attribute
-`useBlueprintPropertyResolver` to false on the `<camelContext>`
-definition.
-
-=== About placeholder syntax
-
-Notice how we can use the Camel syntax for placeholders `{{` and `}}` in the
-Camel route, which will lookup the value from OSGi blueprint.
-
-The blueprint syntax for placeholders is `${ }`. So outside the
-`<camelContext>` you must use the `${ }` syntax. Where as inside
-`<camelContext>` you must use `{{` and `}}` syntax.
-
-OSGi blueprint allows you to configure the syntax, so you can actually
-align those if you want.
-
-You can also explicit refer to a specific OSGi blueprint property
-placeholder by its id. For that you need to use the Camel's
-`<propertyPlaceholder>` as shown in the example below:
-
-[source,xml]
-----
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
-           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
-           xsi:schemaLocation="
-           http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
-
-    <!-- OSGI blueprint property placeholder -->
-    <cm:property-placeholder id="myblueprint.placeholder" persistent-id="camel.blueprint">
-        <!-- list some properties as needed -->
-        <cm:default-properties>
-            <cm:property name="prefix.result" value="mock:result"/>
-        </cm:default-properties>
-    </cm:property-placeholder>
-
-    <camelContext xmlns="http://camel.apache.org/schema/blueprint">
-        <!-- using Camel properties component and refer to the blueprint property placeholder by its id -->
-        <propertyPlaceholder id="properties" location="blueprint:myblueprint.placeholder"/>
-
-        <!-- in the route we can use {{ }} placeholders which will lookup in blueprint -->
-        <route>
-            <from uri="direct:start"/>
-            <to uri="mock:foo"/>
-            <to uri="{{prefix.result}}"/>
-        </route>
-    </camelContext>
-</blueprint>
-----
-
-
-== Explicit referring to a OSGi blueprint placeholder in Camel
-
-Notice how we use the `blueprint` scheme to refer to the OSGi blueprint
-placeholder by its id. This allows you to mix and match, for example you
-can also have additional schemes in the location. For example to load a
-file from the classpath you can do:
-
-[source]
-----
-location="blueprint:myblueprint.placeholder,classpath:myproperties.properties"
-----
-
-Each location is separated by comma.
-
-== Overriding Blueprint property placeholders outside CamelContext
-
-When using Blueprint property placeholder in the Blueprint XML file, you
-can declare the properties directly in the XML file as shown below:
-
-[source,xml]
-----
-<!-- blueprint property placeholders -->
-<cm:property-placeholder persistent-id="my-placeholders" update-strategy="reload">
-  <cm:default-properties>
-    <cm:property name="greeting" value="Hello"/>
-    <cm:property name="destination" value="mock:result"/>
-  </cm:default-properties>
-</cm:property-placeholder>
-
-<!-- a bean that uses a blueprint property placeholder -->
-<bean id="myCoolBean" class="org.apache.camel.test.blueprint.MyCoolBean">
-  <property name="say" value="${greeting}"/>
-</bean>
-
-<camelContext xmlns="http://camel.apache.org/schema/blueprint">
-
-  <route>
-    <from uri="direct:start"/>
-    <bean ref="myCoolBean" method="saySomething"/>
-    <to uri="{{destination}}"/>
-  </route>
-
-</camelContext>
-----
-
-Notice that we have a `<bean>` which refers to one of the properties. And
-in the Camel route we refer to the other using the `{{` and `}}` notation.
-
-Now if you want to override these Blueprint properties from an unit
-test, you can do this as shown below:
-
-[source,java]
-----
-protected String useOverridePropertiesWithConfigAdmin(Dictionary props) {
-    // add the properties we want to override
-    props.put("greeting", "Bye");
-
-    // return the PID of the config-admin we are using in the blueprint xml file
-    return "my-placeholders";
-}
-----
-
-To do this we override and implement the
-`useOverridePropertiesWithConfigAdmin` method. We can then put the
-properties we want to override on the given props parameter. And the
-return value *must* be the `persistence-id` of the
-`<cm:property-placeholder>` tag, which you define in the blueprint XML
-file.
-
-== Using .cfg or .properties file for Blueprint property placeholders
-
-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
-loads the properties from a file in the etc directory with the naming
-`etc/pid.cfg`, where `pid` is the `persistence-id`.
-
-For example in the blueprint XML file we have the
-`persistence-id="stuff"`, which mean it will load the configuration file
-as `etc/stuff.cfg`.
-
-Now if you want to unit test this blueprint XML file, then you can
-override the `loadConfigAdminConfigurationFile` and tell Camel which
-file to load as shown below:
-
-[source,java]
-----
-@Override
-protected String[] loadConfigAdminConfigurationFile() {
-    // String[0] = tell Camel the path of the .cfg file to use for OSGi ConfigAdmin in the blueprint XML file
-    // String[1] = tell Camel the persistence-id of the cm:property-placeholder in the blueprint XML file
-    return new String[]{"src/test/resources/etc/stuff.cfg", "stuff"};
-}
-----
-
-Notice that this method requires to return a `String[]` with 2 values. The
-1st value is the path for the configuration file to load.
-The 2nd value is the `persistence-id` of the `<cm:property-placeholder>`
-tag.
-
-The `stuff.cfg` file is just a plain properties file with the property
-placeholders such as:
-
-[source]
-----
-== this is a comment
-greeting=Bye
-----
-
-== Using .cfg file and overriding properties for Blueprint property placeholders
-
-You can do both as well. Here is a complete example. First we have the
-Blueprint XML file:
-
-And in the unit test class we do as follows:
-
-And the `etc/stuff.cfg` configuration file contains
-
-[source]
-----
-greeting=Bye
-echo=Yay
-destination=mock:result
-----
-
-== Bridging Spring and Camel property placeholders
-
-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
-bean with the type
-`org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer`, which
-is a Spring
-`org.springframework.beans.factory.config.PropertyPlaceholderConfigurer`
-type.
-
-To bridge Spring and Camel you must define a single bean as shown below:
-
-[source,xml]
-----
-  <!-- bridge spring property placeholder with Camel -->
-  <!-- you must NOT use the <context:property-placeholder at the same time, only this bridge bean -->
-  <bean id="bridgePropertyPlaceholder" class="org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer">
-    <property name="location" value="classpath:org/apache/camel/component/properties/cheese.properties"/>
-  </bean>
-----
-
-You *must not* use the spring `<context:property-placeholder>` namespace
-at the same time; this is not possible.
-
-After declaring this bean, you can define property placeholders using
-both the Spring style, and the Camel style within the `<camelContext>` tag
-as shown below:
-
-[source,xml]
-----
-  <!-- a bean that uses Spring property placeholder -->
-  <!-- the ${hi} is a spring property placeholder -->
-  <bean id="hello" class="org.apache.camel.component.properties.HelloBean">
-    <property name="greeting" value="${hi}"/>
-  </bean>
-
-  <camelContext xmlns="http://camel.apache.org/schema/spring">
-    <!-- in this route we use Camels property placeholder {{ }} style -->
-    <route>
-      <from uri="direct:{{cool.bar}}"/>
-      <bean ref="hello"/>
-      <to uri="{{cool.end}}"/>
-    </route>
-  </camelContext>
-----
-
-Notice how the hello bean is using pure Spring property placeholders
-using the `${ }` notation. And in the Camel routes we use the Camel
-placeholder notation with `{{` and `}}`.
-
-== Clashing Spring property placeholders with Camels Simple language
-
-Take notice when using Spring bridging placeholder then the spring `${ }`
-syntax clashes with the xref:languages:simple-language.adoc[Simple] in Camel, and therefore
-take care. For example:
-
-[source,xml]
-----
-<setHeader name="Exchange.FILE_NAME">
-  <simple>{{file.rootdir}}/${in.header.CamelFileName}</simple>
-</setHeader>
-----
-
-clashes with Spring property placeholders, and you should use `$simple{ }`
-to indicate using the xref:languages:simple-language.adoc[Simple] language in Camel.
-
-[source,xml]
-----
-<setHeader name="Exchange.FILE_NAME">
-  <simple>{{file.rootdir}}/$simple{in.header.CamelFileName}</simple>
-</setHeader>
-----
-
-An alternative is to configure the `PropertyPlaceholderConfigurer` with
-`ignoreUnresolvablePlaceholders` option to `true`.
-
-== Overriding properties from Camel test kit
-
-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
-source code. +
-Camel test kits, eg `CamelTestSupport` class offers the following methods
-
-* `useOverridePropertiesWithPropertiesComponent`
-* `ignoreMissingLocationWithPropertiesComponent`
-
-So for example in your unit test classes, you can override the
-`useOverridePropertiesWithPropertiesComponent` method and return a
-`java.util.Properties` that contains the properties which should be
-preferred to be used.
-
-=== Providing properties from within unit test source
-
-This can be done from any of the Camel Test kits, such as camel-test,
-camel-test-spring, and camel-test-blueprint.
-
-The `ignoreMissingLocationWithPropertiesComponent` can be used to
-instruct Camel to ignore any locations which was not discoverable, for
-example if you run the unit test, in an environment that does not have
-access to the location of the properties.
-
-== Using @PropertyInject
-
-Camel allows to inject property placeholders in POJOs using the
-`@PropertyInject` annotation which can be set on fields and setter
-methods.
-
-For example you can use that with `RouteBuilder` classes, such as shown
-below:
-
-[source,java]
-----
-public class MyRouteBuilder extends RouteBuilder {
-
-    @PropertyInject("hello")
-    private String greeting;
-
-    @Override
-    public void configure() throws Exception {
-        from("direct:start")
-            .transform().constant(greeting)
-            .to("{{result}}");
-    }
-
-}
-----
-
-Notice we have annotated the greeting field with `@PropertyInject` and
-define it to use the key `"hello"`. Camel will then lookup the property
-with this key and inject its value, converted to a String type.
-
-You can also use multiple placeholders and text in the key, for example
-we can do:
-
-[source,java]
-----
-@PropertyInject("Hello {{name}} how are you?")
-private String greeting;
-----
-
-This will lookup the placeholder with they key `"name"`.
-
-You can also add a default value if the key does not exists, such as:
-
-[source,java]
-----
-@PropertyInject(value = "myTimeout", defaultValue = "5000")
-private int timeout;
-----
 
 == Using out of the box functions
 
-The xref:properties-component.adoc[Properties] component includes the following
-functions out of the box
+The xref:properties-component.adoc[Properties] component includes the following functions out of the box:
 
 * `env` - A function to lookup the property from OS environment variables
-* `sys` - A function to lookup the property from Java JVM system
-properties
-* `service` - A function to lookup the property from OS environment
-variables using the service naming idiom
-* `service.name` - A function to lookup the
-property from OS environment variables using the service naming idiom
-returning the hostname part only
-* `service.port` - A function to lookup the
-property from OS environment variables using the service naming idiom
-returning the port part only
-
-As you can see these functions is intended to make it easy to lookup
-values from the environment. As they are provided out of the box, they
-can easily be used as shown below:
+* `sys` - A function to lookup the property from Java JVM system properties
+* `service` - A function to lookup the property from OS environment variables using the service naming idiom
+* `service.name` - A function to lookup the property from OS environment variables using the service naming idiom returning the hostname part only
+* `service.port` - A function to lookup the property from OS environment variables using the service naming idiom returning the port part only
+
+As you can see these functions is intended to make it easy to lookup values from the environment.
+As they are provided out of the box, they can easily be used as shown below:
 
 [source,xml]
 ----
   <camelContext xmlns="http://camel.apache.org/schema/blueprint">
     <route>
       <from uri="direct:start"/>
-      <to uri="{`{env:SOMENAME}`}"/>
-      <to uri="{`{sys:MyJvmPropertyName}`}"/>
+      <to uri="{{env:SOMENAME}}"/>
+      <to uri="{{sys:MyJvmPropertyName}}"/>
     </route>
   </camelContext>
 ----
 
-You can use default values as well, so if the property does not exists,
-you can define a default value as shown below, where the default value
-is a `log:foo` and `log:bar` value.
+You can use default values as well, so if the property does not exist, you can define a default value as shown below, where the default value is a `log:foo` and `log:bar` value.
 
 [source,xml]
 ----
   <camelContext xmlns="http://camel.apache.org/schema/blueprint">
     <route>
       <from uri="direct:start"/>
-      <to uri="{`{env:SOMENAME:log:foo}`}"/>
-      <to uri="{`{sys:MyJvmPropertyName:log:bar}`}"/>
+      <to uri="{{env:SOMENAME:log:foo}}"/>
+      <to uri="{{sys:MyJvmPropertyName:log:bar}}"/>
     </route>
   </camelContext>
 ----
 
-The service function is for looking up a service which is defined using
-OS environment variables using the service naming idiom, to refer to a
-service location using `hostname : port`
+The service function is for looking up a service which is defined using OS environment variables using the service naming idiom, to refer to a service location using `hostname : port`
 
 * __NAME__**_SERVICE_HOST**
 * __NAME__**_SERVICE_PORT**
 
-in other words the service uses `_SERVICE_HOST` and `_SERVICE_PORT` as
-prefix. So if the service is named FOO, then the OS environment
-variables should be set as
+in other words the service uses `_SERVICE_HOST` and `_SERVICE_PORT` as prefix.
+So if the service is named FOO, then the OS environment variables should be set as
 
 [source]
 ----
@@ -836,9 +229,7 @@ export $FOO_SERVICE_HOST=myserver
 export $FOO_SERVICE_PORT=8888
 ----
 
-For example if the FOO service a remote HTTP service, then we can refer
-to the service in the Camel endpoint uri, and use
-the HTTP component to make the HTTP call:
+For example if the FOO service a remote HTTP service, then we can refer to the service in the Camel endpoint uri, and use the HTTP component to make the HTTP call:
 
 [source,xml]
 ----
@@ -850,8 +241,7 @@ the HTTP component to make the HTTP call:
 </camelContext>
 ----
 
-And we can use default values if the service has not been defined, for
-example to call a service on localhost, maybe for unit testing etc
+And we can use default values if the service has not been defined, for example to call a service on localhost, maybe for unit testing etc
 
 [source,xml]
 ----
@@ -865,40 +255,33 @@ example to call a service on localhost, maybe for unit testing etc
 
 == Using custom functions (advanced)
 
-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
-placeholders, such as looking up in databases, do custom computations,
-or whatnot. The name of the function becomes the prefix used in the
-placeholder. This is best illustrated in the example code below
+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 placeholders, such as looking up in databases, do custom computations, or whatnot.
+The name of the function becomes the prefix used in the placeholder.
+This is best illustrated in the example code below
 
 [source,xml]
 ----
-<bean id="beerFunction" class="MyBeerFunction"/>
+<beans>
+    <bean id="beerFunction" class="MyBeerFunction"/>
 
-<camelContext xmlns="http://camel.apache.org/schema/blueprint">
-  <propertyPlaceholder id="properties">
-    <propertiesFunction ref="beerFunction"/>
-  </propertyPlaceholder>
+    <camelContext>
+      <propertyPlaceholder id="properties">
+        <propertiesFunction ref="beerFunction"/>
+      </propertyPlaceholder>
 
-  <route>
-    <from uri="direct:start"/>
-    <to uri="{`{beer:FOO}`}"/>
-    <to uri="{`{beer:BAR}`}"/>
-  </route>
-</camelContext>
+      <route>
+        <from uri="direct:start"/>
+        <to uri="{{beer:FOO}}"/>
+        <to uri="{{beer:BAR}}"/>
+      </route>
+    </camelContext>
+</beans>
 ----
 
-[NOTE]
-====
-The location attribute (on propertyPlaceholder tag) is not mandatory
-====
-
 Here we have a Camel XML route where we have defined the
-`<propertyPlaceholder>` to use a custom function, which we refer to be the
-bean id - eg the `beerFunction`. As the beer function uses `"beer"` as its
-name, then the placeholder syntax can trigger the beer function by
-starting with `beer:value`.
+`<propertyPlaceholder>` to use a custom function, which we refer to be the bean id - eg the `beerFunction`.
+As the beer function uses `"beer"` as its name, then the placeholder syntax can trigger the beer function by starting with `beer:value`.
 
 The implementation of the function is only two methods as shown below:
 
@@ -918,48 +301,73 @@ public static final class MyBeerFunction implements PropertiesFunction {
 }
 ----
 
-The function must implement
-the `org.apache.camel.component.properties.PropertiesFunction`
-interface. The method `getName` is  the name of the function, eg beer.
-And the `apply` method is where we implement the custom logic to do. As
-the sample code is from an unit test, it just returns a value to refer
-to a mock endpoint.
+The function must implement the `org.apache.camel.spi.PropertiesFunction` interface.
+The method `getName` is the name of the function, eg beer.
+And the `apply` method is where we implement the custom logic to do.
+As the sample code is from an unit test, it just returns a value to refer to a mock endpoint.
 
 To register a custom function from Java code is as shown below:
 
 [source,java]
 ----
-PropertiesComponent pc = (org.apache.camel.componennt.properties.PropertiesComponent) context.getPropertiesComponent();
+PropertiesComponent pc = context.getPropertiesComponent();
 pc.addFunction(new MyBeerFunction());
 ----
 
+== PropertySource
+
+The regular `PropertySource` will lookup the property on-demand, for example to lookup values from a backend source such as a database or HashiCorp Vault etc.
+
+=== LoadablePropertySource
+
+A `PropertySource` can define that it supports loading all its properties from the source at once, for example from file system.
+This allows Camel properties component to load these properties at once during startup.
 
-== Using 3rd-party properties sources
+=== Using 3rd-party PropertySource
 
 The properties component allows to plugin 3rd party sources to load and lookup properties via the `PropertySource`
-API from camel-api. For example the `camel-microprofile-config` component is implemented using this.
-The 3rd-party `PropertySource` can automatic be discoverd from classpath when Camel is starting up.
-This is done by include the file `META-INF/services/org/apache/camel/property-source-factory` file
-which refers to the fully qualified class name of the `PropertySource` implementation.
-See the `camel-microprofile-config` for an example.
+API from camel-api.
+
+For example the `camel-microprofile-config` component is implemented using this.
+The 3rd-party `PropertySource` can automatic be discovered from classpath when Camel is starting up.
+This is done by include the file `META-INF/services/org/apache/camel/property-source-factory` file which refers to the fully qualified class name of the `PropertySource` implementation.
+
+See xref:components:others:microprofile-config.adoc[MicroProfile Config] component as an example.
 
-You can also register 3rd-part property sources via Java API
+You can also register 3rd-party property sources via Java API:
 
 [source,java]
 ----
-PropertiesComponent pc = ...
+PropertiesComponent pc = context.getPropertiesComponent();
 pc.addPropertySource(myPropertySource);
 ----
 
-=== LoadablePropertySource
-
-A `PropertySource` can define that it supports loading all its properties from the source at once,
-for example from file system. This allows Camel properties component to load these properties at once
-during startup.
 
-=== PropertySource
-
-The regular `PropertySource` will lookup the property on-demand, for example to lookup
-values from a backend source such as a database or HashiCorp Vault etc.
+== Spring Boot Auto-Configuration
 
+The component supports 10 options, which are listed below.
 
+[width="100%",cols="2,5,^1,2",options="header"]
+|===
+| Name | Description | Default | Type
+| *camel.component.properties.auto-discover-properties-sources* | Whether to automatically discovery instances of PropertiesSource from registry and service factory. | true | Boolean
+| *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.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 (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
+| *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.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
+|===
diff --git a/docs/user-manual/modules/ROOT/nav.adoc b/docs/user-manual/modules/ROOT/nav.adoc
index eb6362b..4522dd8 100644
--- a/docs/user-manual/modules/ROOT/nav.adoc
+++ b/docs/user-manual/modules/ROOT/nav.adoc
@@ -36,7 +36,7 @@
 ** xref:bean-integration.adoc[Bean Integration]
 ** xref:browsable-endpoint.adoc[BrowsableEndpoint]
 ** xref:camelcontext.adoc[Context]
-** xref:clustering.adoc[Clustering and loadbalancing]
+** xref:clustering.adoc[Clustering and Load Balancing]
 ** xref:component.adoc[Component]
 ** xref:data-format.adoc[Data Format]
 ** xref:debugger.adoc[Debugger]
@@ -50,6 +50,8 @@
 ** xref:parameter-binding-annotations.adoc[Parameter Binding Annotations]
 ** xref:pojo-producing.adoc[POJO Producing]
 ** xref:pojo-consuming.adoc[POJO Consuming]
+** xref:producertemplate.adoc[ProducerTemplate]
+** xref:consumertemplate.adoc[ConsumerTemplate]
 ** xref:error-handler.adoc[Error Handler]
 ** xref:exchange.adoc[Message Exchange]
 ** xref:exchange-pattern.adoc[Exchange Pattern]
diff --git a/docs/user-manual/modules/ROOT/pages/consumertemplate.adoc b/docs/user-manual/modules/ROOT/pages/consumertemplate.adoc
new file mode 100644
index 0000000..b35cc5e
--- /dev/null
+++ b/docs/user-manual/modules/ROOT/pages/consumertemplate.adoc
@@ -0,0 +1,28 @@
+[[ConsumerTemplate-ConsumerTemplate]]
+= ConsumerTemplate
+
+The `ConsumerTemplate` interface allows you to receive message exchanges from
+endpoints in a variety of different ways to make it easy to work with
+Camel xref:endpoint.adoc[Endpoint] instances from Java code.
+
+It can be configured with a default endpoint if you just want to receive
+lots of messages to the same endpoint; or you can specify an
+xref:endpoint.adoc[Endpoint] or uri as the first parameter.
+
+The `receiveBody()` method allows you to receive any object to an endpoint
+easily as shown:
+
+[source,java]
+----
+ConsumerTemplate template = exchange.getContext().createConsumerTemplate();
+
+// recieve from default endpoint
+Object body = template.receiveBody();
+
+// receive from a specific queue
+body = template.receiveBody("activemq:MyQueue");
+----
+
+== See Also
+
+See xref:producertemplate.adoc[ProducerTemplate]
\ No newline at end of file
diff --git a/docs/user-manual/modules/ROOT/pages/producertemplate.adoc b/docs/user-manual/modules/ROOT/pages/producertemplate.adoc
index 2ded9c4..5d5d3c2 100644
--- a/docs/user-manual/modules/ROOT/pages/producertemplate.adoc
+++ b/docs/user-manual/modules/ROOT/pages/producertemplate.adoc
@@ -104,3 +104,7 @@ Object result = FluentProducerTemplate.on(context)
     .to("direct:start")
     .request();
 ----
+
+== See Also
+
+See xref:consumertemplate.adoc[ConsumerTemplate]
\ No newline at end of file
diff --git a/docs/user-manual/modules/ROOT/pages/using-propertyplaceholder.adoc b/docs/user-manual/modules/ROOT/pages/using-propertyplaceholder.adoc
index 01bf20f..5ddff63 100644
--- a/docs/user-manual/modules/ROOT/pages/using-propertyplaceholder.adoc
+++ b/docs/user-manual/modules/ROOT/pages/using-propertyplaceholder.adoc
@@ -1,21 +1,37 @@
 [[UsingPropertyPlaceholder-UsingPropertyPlaceholder]]
-= Using `PropertyPlaceholder`
+= Property placeholders
+
+Camel has extensive support for property placeholders, which
+can be used _almost anywhere_ in your Camel xref:routes.adoc[routes],
+xref:endpoint.adoc[endpoints], xref:dsl.adoc[DSL], and xref:route-configuration.adoc[route configuration],
+xref:bean-integration.adoc[bean integration] and elsewhere.
+
+Property placeholders are used to define a _placeholder_ instead of the actual value.
+This is important as you would want to be able to make your applications external
+configurable, such as values for network addresses, port numbers, authentication credentials,
+login tokens, and configuration in general.
+
+== Properties component
+
+Camel provides the xref:components::properties-component.adoc[Properties] out of the box
+from the core, which is responsible for handling and resolving the property placeholders.
+
+See the xref:components::properties-component.adoc[Properties] documentation for how
+to configure Camel to known from which location(a) to load properties.
+
+
+[TIP]
+**Resolving property from Java code** +
+You can use the method `resolveProperty` on the `PropertiesComponent` to resolve a single property from Java code.
+Or use the method `resolvePropertyPlaceholders` on the `CamelContext` to resolve (one or more) property placeholder(s) from a string that.
+
+
 
-*Since Camel 2.3*
 
-Camel now provides a new `PropertiesComponent` in `camel-core` which
-allows you to use property placeholders when defining Camel
-xref:endpoint.adoc[Endpoint] URIs. This works much like you would do if
-using Spring's `<property-placeholder>` tag. However Spring has a
-limitation that prevents third-party frameworks from fully leveraging
-Spring property placeholders.
 
-For more details see:
-xref:faq:how-do-i-use-spring-property-placeholder-with-camel-xml.adoc[How do
-I use Spring Property Placeholder with Camel XML].
 
-[[UsingPropertyPlaceholder-BridgingSpringandCamelPropertyPlaceholders]]
 == Bridging Spring and Camel Property Placeholders
+TODO: Remove or move to legacy camel with spring xml files
 
 From *Camel 2.10*: Spring's property placeholder can be bridged with
 Camel's. See below for more details.
@@ -37,16 +53,18 @@ service idiom
 property component
 * *Camel 3.9* Marking a property as optional, meaning that a property is not set if the property key does not exists
 
-[[UsingPropertyPlaceholder-Format]]
-== Format
+
+== Property placeholder syntax
 
 The value of a Camel property can be obtained by specifying its key name
-within a property placeholder, using the following format: `{\{key}}`
+within a property placeholder, using the following syntax: `{\{key}}`
 
 For example:
-....
+
+[source,text]
+----
 {{file.uri}}
-....
+----
 
 where `file.uri` is the property key.
 
@@ -54,258 +72,171 @@ Property placeholders can be used to specify parts, or all, of an
 endpoint's URI by embedding one or more placeholders in the URI's string
 definition.
 
-From *Camel 2.14.1*: you can specify a default value to use if a
-property with the key does not exists, e.g., `file.url:/some/path`
-where the default value is the text after the colon, e.g.,
-`/some/path`.
-
-From *Camel 2.14.1*: do _not_ use a colon in the property key. The colon
-character is used as a token separator when providing a default value.
-
-[[UsingPropertyPlaceholder-UsingPropertyResolver]]
-== Using `PropertyResolver`
-
-Camel provides a pluggable mechanism that allows third-parties to
-specify their own resolver to use for the lookup of properties.
+=== Using property placeholder with default value
 
-Camel provides a default implementation
-`org.apache.camel.component.properties.DefaultPropertiesResolver`
-which is capable of loading properties from the file system, classpath
-or xref:registry.adoc[Registry]. To indicate which source to use the
-location must contain the appropriate prefix.
+You can specify a default value to use if a
+property with the key does not exist, where the default value is the text after the colon:
 
-The list of prefixes is:
-
-[width="100%",cols="50%,50%",options="header",]
-|=======================================================================
-|Prefix |Description
-|`ref:` |Lookup in the xref:registry.adoc[Registry.]
-
-|`file:` |Load from the file system.
-
-|`classpath:` |Load from the classpath (this is also the default if no
-prefix is provided).
+[source,text]
+----
+{{file.url:/some/path}}
+----
 
-|`blueprint:` |Use a specific OSGi blueprint placeholder service.
-|=======================================================================
+In this case the default value is `/some/path`.
 
-[[UsingPropertyPlaceholder-DefiningLocation]]
-== Defining Location
+=== Using optional property placeholders
 
-The `PropertiesResolver` must be configured with the location(s) to
-use when resolving properties. One or more locations can be given.
-Specifying multiple locations can be done a couple of ways: using either
-a single comma separated string, or an array of strings.
+Camel's elaborate property placeholder feature supports optional placeholders,
+which is defined with the `?` (question mark) as prefix in the key name, as shown:
 
-[source,java]
+[source,text]
 ----
-pc.setLocation("com/mycompany/myprop.properties,com/mycompany/other.properties");
-pc.setLocation(new String[] {"com/mycompany/myprop.properties", "com/mycompany/other.properties"});
+{{?myBufferSize}}
 ----
 
-From *Camel 2.19.0*: you can set which location can be discarded if
-missing by setting  `optional=true`, (`false` by default).
-
-Example:
+If a value for the key exists then the value is used, however if the key does not exists,
+then Camel understands this, such as when used in xref:endpoint.adoc[Endpoints]:
 
-[source,java]
+[source,text]
 ----
-pc.setLocations("com/mycompany/override.properties;optional=true,com/mycompany/defaults.properties");
+file:foo?bufferSize={{?myBufferSize}}
 ----
- 
-
-[[UsingPropertyPlaceholder-UsingSystemandEnvironmentVariablesinLocations]]
-== Using System and Environment Variables in Locations
-
-*Since Camel 2.7*
-
-The location now supports using placeholders for JVM system properties
-and OS environments variables.
-
-Example:
-....
-location=file:${karaf.home}/etc/foo.properties
-....
 
-In the location above we defined a location using the file scheme using
-the JVM system property with key `karaf.home`.
+Then the `bufferSize` option will only be configured in the endpoint, if a placeholder exists.
+Otherwise the option will not be set on the endpoint, meaning the endpoint would be _restructued_ as:
 
-To use an OS environment variable instead you would have to prefix with
-`env`:
-
-location=file:${env:APP_HOME}/etc/foo.properties
-
-Where `APP_HOME` is an OS environment variable.
-
-You can have multiple placeholders in the same location, such as:
-
-location=file:${env:APP_HOME}/etc/${prop.name}.properties
-
-== Using optional property placeholders
-
-Camel's elaborate property placeholder feature now supports optional placeholders,
-which is defined by a `?` (question mark) as prefix for the key name, eg
-
-    {{?myBufferSize}}
-
-And Camel understands when you use optional parameters when defining Camel endpoints, eg:
+[source,text]
+----
+file:foo
+----
 
-    file:foo?bufferSize={{?myBufferSize}}
+Then the option `bufferSize` is not in specified at all, and this would allow Camel to
+use the standard default value for `bufferSize` if any exists.
 
-Then the `bufferSize` option will only be configured if a placeholder exists.
-Otherwise the option will not be set on the endpoint, which allows to use any default value instead.
+== Example using property placeholders
 
-[[UsingPropertyPlaceholder-ConfiguringinJavaDSL]]
-== Configuring in Java DSL
+When using property placeholders in the endpoint URIs you should use this with the syntax `{{key}}` as shown in this example:
 
-You have to create and register the `PropertiesComponent` under the
-name `properties` such as:
+[source,properties]
+----
+cool.end = mock:result
+where = cheese
+----
 
+And in Java DSL:
 
 [source,java]
 ----
-PropertiesComponent pc = camelContext.getPropertiesComponent();
-pc.setLocation("classpath:com/mycompany/myprop.properties");
+from("direct:start")
+    .to("{{cool.end}}");
 ----
 
-[[UsingPropertyPlaceholder-ConfiguringinSpringXML]]
-== Configuring in Spring XML
-
-Spring XML offers two variations to configure. You can define a spring
-bean as a `PropertiesComponent` which resembles the way done in Java
-DSL. Or you can use the `<propertyPlaceholder>` tag.
+And in XML DSL:
 
 [source,xml]
 ----
-<bean id="properties" class="org.apache.camel.component.properties.PropertiesComponent">
-    <property name="location" value="classpath:com/mycompany/myprop.properties"/>
-</bean>
+<route>
+  <from uri="direct:start"/>
+  <to uri="{{cool.end}}"/>
+</route>
 ----
 
-Using the `<propertyPlaceholder>` tag makes the configuration a bit
-more fresh such as:
+A property placeholder may also just be a one part in the endpoint URI.
+A common use-case is to use a placeholder for an endpoint option such
+as the size of the write buffer in the file endpoint:
 
-[source,xml]
+[source,properties]
 ----
-<camelContext ...>
-    <propertyPlaceholder id="properties" location="com/mycompany/myprop.properties"/>
-</camelContext>
+buf = 8192
 ----
 
-Setting the properties location through the location tag works just fine
-but sometime you have a number of resources to take into account and
-starting from **Camel 2.19.0** you can set the properties location with
-a dedicated `propertiesLocation`:
-
-[source,xml]
+[source,java]
 ----
-<camelContext ...>
-    <propertyPlaceholder id="myPropertyPlaceholder">
-        <propertiesLocation resolver="classpath" path="com/my/company/something/my-properties-1.properties" optional="false"/>
-        <propertiesLocation resolver="classpath" path="com/my/company/something/my-properties-2.properties" optional="false"/>
-        <propertiesLocation resolver="file" path="${karaf.home}/etc/my-override.properties" optional="true"/>
-    </propertyPlaceholder>
-</camelContext>
+from("direct:start")
+    .to("file:outbox?bufferSize={{buf}}");
 ----
 
-=== Specifying the cache option in XML
-
-From *Camel 2.10*: Camel supports specifying a value for the `cache`
-option both inside the Spring as well as the Blueprint XML.
-
-
-[[UsingPropertyPlaceholder-UsingaPropertiesfromthe]]
-== Using a Properties from the xref:registry.adoc[Registry]
-
-*Since Camel 2.4*
-
-For example in OSGi you may want to expose a service which returns the
-properties as a `java.util.Properties` object.
-
-Then you could setup the xref:components::properties-component.adoc[Properties] component as
-follows:
+And in XML DSL:
 
 [source,xml]
 ----
-<propertyPlaceholder id="properties" location="ref:myProperties"/>
+<route>
+  <from uri="direct:start"/>
+  <to uri="file:outbox?bufferSize={{buf}}"/>
+</route>
 ----
 
-Where `myProperties` is the id to use for lookup in the OSGi registry.
-Notice we use the `ref:` prefix to tell Camel that it should lookup
-the properties for the xref:registry.adoc[Registry].
-
-[[UsingPropertyPlaceholder-ExamplesUsingPropertiesComponent]]
-== Examples Using Properties Component
-
-When using property placeholders in the endpoint URIs you can either use
-the `properties:` component or define the placeholders directly in the
-URI. We will show example of both cases, starting with the former.
+However the placeholder can be anywhere, so it could also be the name of a mock endpoint
 
 [source,java]
 ----
-// properties
-cool.end=mock:result
-
-// route
 from("direct:start")
-    .to("{{cool.end}}");
+    .to("mock:{{where}}");
 ----
 
-You can also use placeholders as a part of the endpoint URI:
+In the example above the mock endpoint, is already hardcoded to start with `mock:`,
+and the `where` placeholder has the value `cheese` so the resolved uri becomes `mock:cheese`.
 
-[source,java]
-----
-// properties
-cool.foo=result
-
-// route
-from("direct:start")
-    .to("mock:{{cool.foo}}");
-----
-
-In the example above the to endpoint will be resolved to
-`mock:result`.
+=== Property placeholders referring to other properties
 
 You can also have properties with refer to each other such as:
 
-
-[source,java]
+[source,properties]
 ----
-// properties
 cool.foo=result
 cool.concat=mock:{{cool.foo}}
-
-// route
-from("direct:start")
-    .to("mock:{{cool.concat}}");
 ----
 
 Notice how `cool.concat` refer to another property.
 
-And you can use placeholders several times:
+And the route in XML:
 
-[source,java]
+[source,xml]
+----
+<route>
+  <from uri="direct:start"/>
+  <to uri="{{cool.concat}}"/>
+</route>
+----
+
+=== Using property placeholders multiple times
+
+You can of couse also use placeholders several times:
+
+[source,properties]
 ----
-// properties
 cool.start=direct:start
 cool.showid=true
 cool.result=result
+----
 
-// route
+And in this route we use `cool.start` two times:
+
+[source,java]
+----
 from("{{cool.start}}")
     .to("log:{{cool.start}}?showBodyType=false&showExchangeId={{cool.showid}}")
     .to("mock:{{cool.result}}");
 ----
 
+=== Using property placeholders with producer template
+
 You can also your property placeholders when using
 xref:producertemplate.adoc[ProducerTemplate] for example:
 
-
 [source,java]
 ----
 template.sendBody("{{cool.start}}", "Hello World");
 ----
 
+This can also be done when using xref:consumertemplate.adoc[ConsumerTemplate], such as:
+
+[source,java]
+----
+Object body = template.receiveBody("{{cool.start}}");
+----
+
+
 
 [[UsingPropertyPlaceholder-Examplewithlanguage]]
 == Example with xref:components:languages:simple-language.adoc[Simple] language
@@ -338,49 +269,6 @@ from("direct:start")
 ----
 
 
-[[UsingPropertyPlaceholder-AdditionalPropertyPlaceholderSupportinSpringXML]]
-== Additional Property Placeholder Support in Spring XML
-
-The property placeholders is also supported in many of the Camel Spring
-XML tags such as
-`<package>`, `<packageScan>`, `<contextScan>`, `<jmxAgent>`, `<endpoint>`, `<routeBuilder>`
-and the others.
-
-Example using property placeholders in the `<jmxAgent>` tag:
-
-[source,xml]
-----
-<camelContext xmlns="http://camel.apache.org/schema/spring">
-    <propertyPlaceholder id="properties" location="org/apache/camel/spring/jmx.properties"/>
-    <!-- we can use propery placeholders when we define the JMX agent -->
-    <jmxAgent id="agent" registryPort="{{myjmx.port}}" disabled="{{myjmx.disabled}}"
-              usePlatformMBeanServer="{{myjmx.usePlatform}}" createConnector="true"
-              statisticsLevel="RoutesOnly" useHostIPAddress="true"/>
-    <route id="foo" autoStartup="false">
-        <from uri="seda:start"/>
-        <to uri="mock:result"/>
-    </route>
-</camelContext>
-----
-
-
-Example using property placeholders in the attributes of `<camelContext>`:
-
-[source,xml]
-----
-<camelContext trace="{{foo.trace}}" xmlns="http://camel.apache.org/schema/spring">
-    <propertyPlaceholder id="properties" location="org/apache/camel/spring/processor/myprop.properties"/>
-    <template id="camelTemplate" defaultEndpoint="{{foo.cool}}"/>
-    <route>
-        <from uri="direct:start"/>
-        <setHeader name="{{foo.header}}">
-            <simple>${in.body} World!</simple>
-        </setHeader>
-        <to uri="mock:result"/>
-    </route>
-</camelContext>
-----
-
 
 [[UsingPropertyPlaceholder-UsingPropertyPlaceholdersforAnyKindofAttributeintheXMLDSL]]
 == Using Property Placeholders for Any Kind of Attribute in the XML DSL
@@ -1112,3 +1000,22 @@ PropertiesComponent pc = context.getPropertiesComponent();
 pc.addFunction(new MyBeerFunction());
 ----
 
+== Negate boolean value
+
+If a property placeholder is a boolean value, then it is possible to negate (reverse) the value by using `!` as prefix in the key.
+
+[source,java]
+----
+// properties
+integration.ftpEnabled=true
+
+// route
+from("ftp:....").autoStartup("{{integration.ftpEnabled}}")
+    .to("kafka:cheese")
+
+from("jms:....").autoStartup("{{!integration.ftpEnabled}}")
+    .to("kafka:cheese")
+----
+
+In the example above then the FTP route or the JMS route should only be started. So if the FTP is enabled then JMS should be disable, and vise-versa.
+We can do this be negating the `autoStartup` in the JMS route, by using `!integration.ftpEnabled` as the key.
diff --git a/docs/user-manual/modules/faq/nav.adoc b/docs/user-manual/modules/faq/nav.adoc
index 6c8ac3c..8c17406 100644
--- a/docs/user-manual/modules/faq/nav.adoc
+++ b/docs/user-manual/modules/faq/nav.adoc
@@ -39,7 +39,6 @@
 ** xref:how-do-i-retry-processing-a-message-from-a-certain-point-back-or-an-entire-route.adoc[How do I retry processing a message from a certain point back or an entire route?]
 ** xref:how-do-i-reuse-the-contexttestsupport-class-in-my-unit-tests.adoc[How do I reuse the ContextTestSupport class in my unit tests?]
 ** xref:how-do-i-set-the-max-chars-when-debug-logging-messages-in-camel.adoc[How do I set the max chars when debug logging messages in Camel?]
-** xref:how-do-i-use-spring-property-placeholder-with-camel-xml.adoc[How do I use Spring Property Placeholder with Camel XML?]
 ** xref:how-do-i-use-uris-with-parameters-in-xml.adoc[How do I use URIs with parameters in XML?]
 ** xref:how-do-i-write-a-custom-processor-which-sends-multiple-messages.adoc[How do I write a custom Processor which sends multiple messages?]
 ** xref:how-should-i-invoke-my-pojos-or-spring-services.adoc[How should I invoke my POJOs or Spring Services?]
diff --git a/docs/user-manual/modules/faq/pages/how-do-i-use-spring-property-placeholder-with-camel-xml.adoc b/docs/user-manual/modules/faq/pages/how-do-i-use-spring-property-placeholder-with-camel-xml.adoc
deleted file mode 100644
index fd11da9..0000000
--- a/docs/user-manual/modules/faq/pages/how-do-i-use-spring-property-placeholder-with-camel-xml.adoc
+++ /dev/null
@@ -1,77 +0,0 @@
-[[HowdoIuseSpringPropertyPlaceholderwithCamelXML-HowdoIuseSpringPropertyPlaceholderwithCamelXML]]
-= How do I use Spring Property Placeholder with Camel XML
-
-We do *NOT* yet support the `$\{something}` notation inside arbitrary
-Camel XML. For example at the time of writing this is *NOT* supported
-(due Spring limitations).
-
-*IS NOT SUPPORTED*
-
-[source,xml]
-----
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-       http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
-    ">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <camelContext xmlns="http://activemq.apache.org/camel/schema/spring">
-    <route>
-      <from uri="activemq:${someQueueName}"/>
-      <to uri="mock:results"/>
-    </route>
-  </camelContext>
-
-</beans>
-----
-
-However you can use the `<endpoint/>` element to define endpoints which
-does support the property resolving which you can then refer to by name,
-using the xref:components::ref-component.adoc[Ref] component as shown below (notice the `ref:`
-in the URI):
-
-*SUPPORTED*
-
-[source,xml]
-----
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-       http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
-    ">
-
-  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
-  <camelContext xmlns="http://activemq.apache.org/camel/schema/spring">
-    <endpoint id="input1" uri="activemq:${someQueueName}"/>
-
-    <route>
-      <from uri="ref:input1"/>
-      <to uri="activemq:OutputQueue"/>
-    </route>
-  </camelContext>
-
-</beans>
-----
-
-Camel does not yet fully support property placeholders as there is a
-limitation in Spring. See JIRA
-http://jira.springframework.org/browse/SPR-4466[SPR-4466]
-
-== Bridge Spring and Camel property placeholders
-
-From Camel 2.10 onwards you can bridge Spring and Camel property
-placeholders, see xref:ROOT:using-propertyplaceholder.adoc[Using
-PropertyPlaceholder] for more details.
-
-Here is a trick that you can use to define the uri in a property file
-using Spring injection and Camel endpoint:
-http://cmoulliard.blogspot.com/2009/05/trick-to-pass-uri-declared-in-property.html.
-
-From Camel 2.3 onwards there is a xref:components::properties-component.adoc[Properties]
-component build in Camel core which allows you to use properties in the
-same way as Spring property placeholders, and even more.
diff --git a/docs/user-manual/modules/faq/pages/index.adoc b/docs/user-manual/modules/faq/pages/index.adoc
index 4402f58..1aa0183 100644
--- a/docs/user-manual/modules/faq/pages/index.adoc
+++ b/docs/user-manual/modules/faq/pages/index.adoc
@@ -61,7 +61,6 @@ Questions on using Apache Camel
 * xref:how-do-i-retry-processing-a-message-from-a-certain-point-back-or-an-entire-route.adoc[How do I retry processing a message from a certain point back or an entire route?]
 * xref:how-do-i-reuse-the-contexttestsupport-class-in-my-unit-tests.adoc[How do I reuse the ContextTestSupport class in my unit tests?]
 * xref:how-do-i-set-the-max-chars-when-debug-logging-messages-in-camel.adoc[How do I set the max chars when debug logging messages in Camel?]
-* xref:how-do-i-use-spring-property-placeholder-with-camel-xml.adoc[How do I use Spring Property Placeholder with Camel XML?]
 * xref:how-do-i-use-uris-with-parameters-in-xml.adoc[How do I use URIs with parameters in XML?]
 * xref:how-do-i-write-a-custom-processor-which-sends-multiple-messages.adoc[How do I write a custom Processor which sends multiple messages?]
 * xref:how-should-i-invoke-my-pojos-or-spring-services.adoc[How should I invoke my POJOs or Spring Services?]

[camel] 03/04: Polish and cleanup documentation

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 66bd70dd2159ca1e87759651827c8b6d4a1a9322
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Aug 18 16:05:26 2021 +0200

    Polish and cleanup documentation
---
 .../java/org/apache/camel/ConsumerTemplate.java    | 13 ++----------
 .../modules/ROOT/pages/consumertemplate.adoc       | 23 ++++++++++++++++++++++
 2 files changed, 25 insertions(+), 11 deletions(-)

diff --git a/core/camel-api/src/main/java/org/apache/camel/ConsumerTemplate.java b/core/camel-api/src/main/java/org/apache/camel/ConsumerTemplate.java
index 5c4d04e..08e29fb 100644
--- a/core/camel-api/src/main/java/org/apache/camel/ConsumerTemplate.java
+++ b/core/camel-api/src/main/java/org/apache/camel/ConsumerTemplate.java
@@ -28,19 +28,10 @@ package org.apache.camel;
  * <p/>
  * <b>All</b> methods throws {@link RuntimeCamelException} if consuming of the {@link Exchange} failed and an Exception
  * occurred. The <tt>getCause</tt> method on {@link RuntimeCamelException} returns the wrapper original caused
- * exception. <br/>
- * <p/>
- * All the receive<b>Body</b> methods will return the content according to this strategy
- * <ul>
- * <li>throws {@link RuntimeCamelException} as stated above</li>
- * <li>The <tt>fault.body</tt> if there is a fault message set and its not <tt>null</tt></li>
- * <li>The <tt>out.body</tt> if there is a out message set and its not <tt>null</tt></li>
- * <li>The <tt>in.body</tt></li>
- * </ul>
- * <br/>
+ * exception.
  * <p/>
  * Before using the template it must be started. And when you are done using the template, make sure to {@link #stop()}
- * the template. <br/>
+ * the template.
  * <p/>
  * <b>Important note on usage:</b> See this
  * <a href="http://camel.apache.org/why-does-camel-use-too-many-threads-with-producertemplate.html">FAQ entry</a> before
diff --git a/docs/user-manual/modules/ROOT/pages/consumertemplate.adoc b/docs/user-manual/modules/ROOT/pages/consumertemplate.adoc
index b35cc5e..73ae127 100644
--- a/docs/user-manual/modules/ROOT/pages/consumertemplate.adoc
+++ b/docs/user-manual/modules/ROOT/pages/consumertemplate.adoc
@@ -23,6 +23,29 @@ Object body = template.receiveBody();
 body = template.receiveBody("activemq:MyQueue");
 ----
 
+== Receive modes
+
+The consumer template operates in three modes:
+
+- **receive** - Consumes from the endpoint, waiting until there is a message (can potentially wait for a long time!).
+- **receiveNoWait** - Consumes from endpoint, not waiting for a message if none exists.
+- **receiveTimeout** - Consumes from the endpoint, waiting until there is a response, or the timeout occurs.
+
+In the previous examples then it was the first mode we used (`receiveBody`).
+For example if there are no messages on the `activemq:MyQueue` then Camel would wait until a message is sent to this queue.
+
+Often you dont want to wait _forever_ so its often a good idea to use a timeout value, such as 5 seconds:
+
+[source,java]
+----
+ConsumerTemplate template = exchange.getContext().createConsumerTemplate();
+
+// receive from a specific queue
+body = template.receiveBody("activemq:MyQueue", 5000);
+----
+
+Here we wait at most 5 seconds for a message to be consumed, if there was no message, then `null` is returned as response.
+
 == See Also
 
 See xref:producertemplate.adoc[ProducerTemplate]
\ No newline at end of file