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/16 15:30:50 UTC

[camel] branch master updated: Fixed camel-website WARN about missing snippet

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 eb3d5c8  Fixed camel-website WARN about missing snippet
eb3d5c8 is described below

commit eb3d5c89dae87d7b269f23da853b8d29e4df6e95
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Dec 16 16:30:16 2020 +0100

    Fixed camel-website WARN about missing snippet
---
 .../src/main/docs/properties-component.adoc         | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/core/camel-base/src/main/docs/properties-component.adoc b/core/camel-base/src/main/docs/properties-component.adoc
index eea8af6..4c73975 100644
--- a/core/camel-base/src/main/docs/properties-component.adoc
+++ b/core/camel-base/src/main/docs/properties-component.adoc
@@ -613,7 +613,11 @@ To bridge Spring and Camel you must define a single bean as shown below:
 
 [source,xml]
 ----
-include::{examplesdir}/components/camel-spring/src/test/resources/org/apache/camel/components/properties/CamelSpringPropertyPlaceholderConfigurerTest.xml[tags=e1]
+  <!-- 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
@@ -625,7 +629,20 @@ as shown below:
 
 [source,xml]
 ----
-include::{examplesdir}/components/camel-spring/src/test/resources/org/apache/camel/components/properties/CamelSpringPropertyPlaceholderConfigurerTest.xml[tags=e2]
+  <!-- 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