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 2020/12/11 08:28:34 UTC

[camel] branch master updated: Update Properties docs (Spring -> Camel bridge examples) (#4756)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new ce979e5  Update Properties docs (Spring -> Camel bridge examples) (#4756)
ce979e5 is described below

commit ce979e54968cf9dcb32ea646892e28abd591e3a2
Author: Jared Whiklo <jw...@gmail.com>
AuthorDate: Fri Dec 11 02:28:07 2020 -0600

    Update Properties docs (Spring -> Camel bridge examples) (#4756)
---
 .../CamelSpringPropertyPlaceholderConfigurerTest.xml       |  4 ++++
 core/camel-base/src/main/docs/properties-component.adoc    | 14 ++++++++++----
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/components/camel-spring/src/test/resources/org/apache/camel/component/properties/CamelSpringPropertyPlaceholderConfigurerTest.xml b/components/camel-spring/src/test/resources/org/apache/camel/component/properties/CamelSpringPropertyPlaceholderConfigurerTest.xml
index 3bdc682..a15e6d4 100644
--- a/components/camel-spring/src/test/resources/org/apache/camel/component/properties/CamelSpringPropertyPlaceholderConfigurerTest.xml
+++ b/components/camel-spring/src/test/resources/org/apache/camel/component/properties/CamelSpringPropertyPlaceholderConfigurerTest.xml
@@ -23,6 +23,7 @@
        http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
 
   <!-- START SNIPPET: e1 -->
+  <!-- tag::e1[] -->
 
   <!-- bridge spring property placeholder with Camel -->
   <!-- you must NOT use the <context:property-placeholder at the same time, only this bridge bean -->
@@ -30,9 +31,11 @@
     <property name="location" value="classpath:org/apache/camel/component/properties/cheese.properties"/>
   </bean>
 
+  <!-- end::e1[] -->
   <!-- END SNIPPET: e1 -->
 
   <!-- START SNIPPET: e2 -->
+  <!-- tag::e2[] -->
 
   <!-- a bean that uses Spring property placeholder -->
   <!-- the ${hi} is a spring property placeholder -->
@@ -49,6 +52,7 @@
     </route>
   </camelContext>
 
+  <!-- end::e2[] -->
   <!-- END SNIPPET: e2 -->
 
 </beans>
diff --git a/core/camel-base/src/main/docs/properties-component.adoc b/core/camel-base/src/main/docs/properties-component.adoc
index cf85ba1..eea8af6 100644
--- a/core/camel-base/src/main/docs/properties-component.adoc
+++ b/core/camel-base/src/main/docs/properties-component.adoc
@@ -611,16 +611,22 @@ type.
 
 To bridge Spring and Camel you must define a single bean as shown below:
 
-*Bridging Spring and Camel property placeholders*
+[source,xml]
+----
+include::{examplesdir}/components/camel-spring/src/test/resources/org/apache/camel/components/properties/CamelSpringPropertyPlaceholderConfigurerTest.xml[tags=e1]
+----
 
-You *must not* use the spring <context:property-placeholder> namespace
+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
+both the Spring style, and the Camel style within the `<camelContext>` tag
 as shown below:
 
-*Using bridge property placeholders*
+[source,xml]
+----
+include::{examplesdir}/components/camel-spring/src/test/resources/org/apache/camel/components/properties/CamelSpringPropertyPlaceholderConfigurerTest.xml[tags=e2]
+----
 
 Notice how the hello bean is using pure Spring property placeholders
 using the `${ }` notation. And in the Camel routes we use the Camel