CAMEL-10075: Documentation - added code sample in place of broken snippets
diff --git a/camel-core/src/main/docs/properties.adoc b/camel-core/src/main/docs/properties.adoc
index d67c159..e9ae443 100644
--- a/camel-core/src/main/docs/properties.adoc
+++ b/camel-core/src/main/docs/properties.adoc
@@ -532,6 +532,34 @@
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]
+----
+<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
@@ -558,6 +586,38 @@
placeholder by its id. For that you need to use the Camel's
`<propertyPlaceholder>` as shown in the example below:
+[source]
+----
+<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>
+----
+
*Explicit referring to a OSGi blueprint placeholder in Camel*
Notice how we use the `blueprint` scheme to refer to the OSGi blueprint