Author: buildbot
Date: Wed Feb  1 18:19:58 2017
New Revision: 1006044

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/book-component-appendix.html
    websites/production/camel/content/book-in-one-page.html
    websites/production/camel/content/cache/main.pageCache
    websites/production/camel/content/properties.html
    websites/production/camel/content/using-propertyplaceholder.html

Modified: websites/production/camel/content/book-component-appendix.html
==============================================================================
--- websites/production/camel/content/book-component-appendix.html (original)
+++ websites/production/camel/content/book-component-appendix.html Wed Feb  1 
18:19:58 2017
@@ -621,8 +621,8 @@ cometds://localhost:8443/service/mychann
  <div class="confluence-information-macro-body">
   <p>When using CXF in streaming modes (see DataFormat option), then also read 
about <a shape="rect" href="stream-caching.html">Stream caching</a>.</p>
  </div>
-</div><p>The <strong>cxf:</strong> component provides integration with <a 
shape="rect" href="http://cxf.apache.org";>Apache CXF</a> for connecting to 
JAX-WS services hosted in CXF.</p><p><style type="text/css">/**/ 
div.rbtoc1485818260800 {padding: 0px;} div.rbtoc1485818260800 ul {list-style: 
disc;margin-left: 0px;} div.rbtoc1485818260800 li {margin-left: 
0px;padding-left: 0px;} /**/</style>
- </p><div class="toc-macro rbtoc1485818260800"> 
+</div><p>The <strong>cxf:</strong> component provides integration with <a 
shape="rect" href="http://cxf.apache.org";>Apache CXF</a> for connecting to 
JAX-WS services hosted in CXF.</p><p><style type="text/css">/**/ 
div.rbtoc1485973067488 {padding: 0px;} div.rbtoc1485973067488 ul {list-style: 
disc;margin-left: 0px;} div.rbtoc1485973067488 li {margin-left: 
0px;padding-left: 0px;} /**/</style>
+ </p><div class="toc-macro rbtoc1485973067488"> 
   <ul class="toc-indentation"><li><a shape="rect" 
href="#BookComponentAppendix-CXFComponent">CXF Component</a> 
     <ul class="toc-indentation"><li><a shape="rect" 
href="#BookComponentAppendix-URIformat">URI format</a></li><li><a shape="rect" 
href="#BookComponentAppendix-Options">Options</a> 
       <ul class="toc-indentation"><li><a shape="rect" 
href="#BookComponentAppendix-Thedescriptionsofthedataformats">The descriptions 
of the dataformats</a> 
@@ -4582,38 +4582,44 @@ cometds://localhost:8443/service/mychann
  <div class="confluence-information-macro-body">
   <p>You can use the method 
<strong><code>resolvePropertyPlaceholders</code></strong> on the 
<strong><code>CamelContext</code></strong> to resolve a property from any Java 
code.</p>
  </div>
-</div><p></p><h2 
id="BookComponentAppendix-UsingPropertyPlaceholder">Using&#160;<code>PropertyPlaceholder</code></h2><p><strong>Available
 as of Camel 2.3</strong></p><p>Camel now provides a new 
<strong><code>PropertiesComponent</code></strong> in 
<strong>camel-core</strong> which allows you to use property placeholders when 
defining Camel <a shape="rect" href="endpoint.html">Endpoint</a> URIs. This 
works much like you would do if using Spring's 
<strong><code>&lt;property-placeholder&gt;</code></strong> tag. However Spring 
has a limitation that prevents 3rd party frameworks from fully leveraging 
Spring property placeholders.</p><p>For more details see: <a shape="rect" 
href="how-do-i-use-spring-property-placeholder-with-camel-xml.html">How do I 
use Spring Property Placeholder with Camel XML</a>.</p>
+</div><p></p><h2 
id="BookComponentAppendix-UsingPropertyPlaceholder">Using&#160;<strong><code>PropertyPlaceholder</code></strong></h2><p><strong>Available
 as of Camel 2.3</strong></p><p>Camel now provides a new 
<strong><code>PropertiesComponent</code></strong> 
in&#160;<strong><code>camel-core</code></strong> which allows you to use 
property placeholders when defining Camel <a shape="rect" 
href="endpoint.html">Endpoint</a> URIs. This works much like you would do if 
using Spring's <strong><code>&lt;property-placeholder&gt;</code></strong> tag. 
However Spring has a limitation that prevents third-party frameworks from fully 
leveraging Spring property placeholders.</p><p>For more details see: <a 
shape="rect" 
href="how-do-i-use-spring-property-placeholder-with-camel-xml.html">How do I 
use Spring Property Placeholder with Camel XML</a>.</p>
  <div class="confluence-information-macro confluence-information-macro-tip">
   <p class="title">Bridging Spring and Camel property placeholders</p>
   <span class="aui-icon aui-icon-small aui-iconfont-approve 
confluence-information-macro-icon"></span>
   <div class="confluence-information-macro-body">
    <p>From <strong>Camel 2.10</strong>: Spring's property placeholder can be 
bridged with Camel's. See below for more details.</p>
   </div>
- </div><p>The property placeholder is generally in use when doing any of the 
following:</p>
- <ul class="alternate"><li>lookup or creating endpoints.</li><li>lookup of 
beans in the <a shape="rect" 
href="registry.html">Registry.</a></li><li>additional supported in Spring XML 
(see below in examples).</li><li>using 
Blueprint&#160;<strong><code>PropertyPlaceholder</code></strong> with Camel <a 
shape="rect" href="properties.html">Properties</a> component.</li><li>using 
<strong><code>@PropertyInject</code></strong> to inject a property in a 
POJO.</li><li><strong>Camel 2.14.1</strong> Using default value if a property 
does not exists.</li><li><strong>Camel 2.14.1</strong> Include out of the box 
functions, to lookup property values from OS environment variables, JVM system 
properties, or the service idiom.</li><li><strong>Camel 2.14.1</strong> Using 
custom functions, which can be plugged into the property 
component.</li></ul><h3 id="BookComponentAppendix-Syntax">Syntax</h3><p>The 
syntax to use Camel's property placeholder is to use 
<strong>{{<code>key</code>}}</strong> for example 
 <strong>{{<code>file.uri</code>}}</strong> where 
<strong><code>file.uri</code></strong> 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.</p><p>From&#160;<strong>Camel 
2.14.1</strong>: you can specify a default value to use if a property with the 
key does not exists, e.g., <strong><code>file.url:/some/path</code></strong> 
where the default value is the text after the colon, e.g., 
<strong><code>/some/path</code></strong>.</p>
+ </div><p>The property placeholder is typically used when trying to do any of 
the following:</p>
+ <ul class="alternate"><li>Lookup or creating endpoints.</li><li>Lookup of 
beans in the <a shape="rect" 
href="registry.html">Registry.</a></li><li>Additional supported in Spring XML 
(see below in examples).</li><li>Using 
Blueprint&#160;<strong><code>PropertyPlaceholder</code></strong> with Camel <a 
shape="rect" href="properties.html">Properties</a> component.</li><li>Using 
<strong><code>@PropertyInject</code></strong> to inject a property in a 
POJO.</li><li><strong>Camel 2.14.1</strong> Using default value if a property 
does not exists.</li><li><strong>Camel 2.14.1</strong> Include out of the box 
functions, to lookup property values from OS environment variables, JVM system 
properties, or the service idiom.</li><li><strong>Camel 2.14.1</strong> Using 
custom functions, which can be plugged into the property 
component.</li></ul><h3 id="BookComponentAppendix-Format">Format</h3><p>The 
value of a Camel property can be obtained by specifying its key name within a 
property placeholder, usi
 ng the following format: <strong>{{<code>key</code>}}</strong>.</p><p>For 
example:</p>
+ <div class="code panel pdl" style="border-width: 1px;">
+  <div class="codeContent panelContent pdl"> 
+   <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter">{{file.uri}}</script> 
+  </div>
+ </div><p>where <strong><code>file.uri</code></strong> is the property 
key.</p><p>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.</p><p>From&#160;<strong>Camel 2.14.1</strong>: you can specify a 
default value to use if a property with the key does not exists, e.g., 
<strong><code>file.url:/some/path</code></strong> where the default value is 
the text after the colon, e.g., <strong><code>/some/path</code></strong>.</p>
  <div class="confluence-information-macro 
confluence-information-macro-information">
   <span class="aui-icon aui-icon-small aui-iconfont-info 
confluence-information-macro-icon"></span>
   <div class="confluence-information-macro-body">
    <p>From <strong>Camel 2.14.1</strong>: do <em>not</em> use a colon in the 
property key. The colon character is used as a token separator when providing a 
default value.</p>
   </div>
- </div><h3 
id="BookComponentAppendix-UsingPropertyResolver">Using&#160;<code>PropertyResolver</code></h3><p>Camel
 provides a pluggable mechanism which allows 3rd part to provide their own 
resolver to lookup properties. Camel provides a default implementation 
<strong><code>org.apache.camel.component.properties.DefaultPropertiesResolver</code></strong>
 which is capable of loading properties from the file system, classpath or <a 
shape="rect" href="registry.html">Registry</a>. You can prefix the locations 
with either:</p>
- <ul class="alternate"><li><strong><code>ref:</code> Camel 2.4:</strong> to 
lookup in the <a shape="rect" 
href="registry.html">Registry.</a></li><li><strong><code>file:</code></strong> 
to load the from file system.</li><li><strong><code>classpath:</code></strong> 
to load from classpath (this is also the default if no prefix is 
provided).</li><li><strong><code>blueprint:</code> Camel 2.7:</strong> to use a 
specific OSGi blueprint placeholder service.</li></ul><h3 
id="BookComponentAppendix-DefiningLocation">Defining Location</h3><p>The 
<strong><code>PropertiesResolver</code></strong> need 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:</p>
+ </div><h3 
id="BookComponentAppendix-UsingPropertyResolver">Using&#160;<code>PropertyResolver</code></h3><p>Camel
 provides a pluggable mechanism that allows third-parties to specify their own 
resolver to use for the lookup of properties.</p><p>Camel provides a default 
implementation 
<strong><code>org.apache.camel.component.properties.DefaultPropertiesResolver</code></strong>
 which is capable of loading properties from the file system, classpath or <a 
shape="rect" href="registry.html">Registry</a>. To indicate which source to use 
the location must contain the appropriate prefix.</p><p>The list of prefixes 
is:</p>
+ <div class="table-wrap">
+  <table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Prefix</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>ref:</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Lookup in the <a shape="rect" 
href="registry.html">Registry.</a></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>file:</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Load the from file system.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>classpath:</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Load from the classpath (this is also the 
default if no prefix is provided).</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>blueprint:</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Use a specific OSGi blueprint placeholder 
service.</
 p></td></tr></tbody></table>
+ </div><h3 id="BookComponentAppendix-DefiningLocation">Defining 
Location</h3><p>The <strong><code>PropertiesResolver</code></strong> 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.</p>
  <div class="code panel pdl" style="border-width: 1px;">
   <div class="codeContent panelContent pdl"> 
-   <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter">pc.setLocation(&amp;quot;com/mycompany/myprop.properties,com/mycompany/other.properties&amp;quot;);
 </script> 
+   <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter">pc.setLocation(&amp;quot;com/mycompany/myprop.properties,com/mycompany/other.properties&amp;quot;);
 pc.setLocation(new String[] 
{&amp;quot;com/mycompany/myprop.properties&amp;quot;, 
&amp;quot;com/mycompany/other.properties&amp;quot;});&nbsp;</script> 
   </div>
  </div>
  <div>
-  <p><span><br clear="none"></span></p>
-  <p><strong>Available as of Camel 2.19.0</strong></p>
-  <p>You can set which location can be discarded if missing by by setting 
the&#160;<code>optional</code>&#160;attribute, which is false by default, 
i.e:</p>
+  <p>&#160;</p>
+  <p>From<strong> Camel 2.19.0</strong>: you can set which location can be 
discarded if missing by setting&#160; 
<strong><code>optional=true</code></strong>, 
(<strong><code>false</code></strong> by default).</p>
+  <p>Example:</p>
  </div>
  <div>
-  <h4 id="BookComponentAppendix-ConfiguringinSpringXML">Configuring in Spring 
XML</h4>
   <p>&#160;</p>
   <div class="code panel pdl" style="border-width: 1px;">
    <div class="codeContent panelContent pdl"> 
-    <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter">pc.setLocations( 
&amp;quot;com/mycompany/override.properties;optional=true&amp;quot; 
&amp;quot;com/mycompany/defaults.properties&amp;quot;);</script> 
+    <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter">pc.setLocations(&amp;quot;com/mycompany/override.properties;optional=true,com/mycompany/defaults.properties&amp;quot;);</script>
 
    </div>
   </div>
   <p>&#160;</p>
@@ -4627,28 +4633,27 @@ cometds://localhost:8443/service/mychann
   <div class="codeContent panelContent pdl"> 
    <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter">location=file:${env:APP_HOME}/etc/foo.properties 
</script> 
   </div>
- </div><p>Where <strong><code>APP_HOME</code></strong> is an OS 
environment.</p><p>You can have multiple placeholders in the same location, 
such as:</p>
+ </div><p>Where <strong><code>APP_HOME</code></strong> is an OS environment 
variable.</p><p>You can have multiple placeholders in the same location, such 
as:</p>
  <div class="code panel pdl" style="border-width: 1px;">
   <div class="codeContent panelContent pdl"> 
    <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter">location=file:${env:APP_HOME}/etc/${prop.name}.properties
 </script> 
   </div>
- </div><h4 
id="BookComponentAppendix-UsingSystemandEnvironmentVariablestoConfigurePropertyPrefixesandSuffixes">Using
 System and Environment Variables to Configure Property Prefixes and 
Suffixes</h4><p><strong>Available as of Camel 2.12.5, 2.13.3, 
2.14.0</strong></p><p><strong><code>propertyPrefix</code></strong>, 
<strong><code>propertySuffix</code></strong> configuration properties support 
using placeholders for JVM system properties and OS environments 
variables.</p><p>For example, 
if&#160;<strong><code>PropertiesComponent</code></strong> is configured with 
the following properties file:</p>
- <div class="preformatted panel" style="border-width: 1px;">
-  <div class="preformattedContent panelContent"> 
-   <pre>dev.endpoint = result1
-test.endpoint = result2</pre> 
+ </div><h4 
id="BookComponentAppendix-UsingSystemorEnvironmentVariablestoConfigurePropertyPrefixesandSuffixes">Using
 System or Environment Variables to Configure Property Prefixes and 
Suffixes</h4><p>From<strong> Camel 2.12.5, 2.13.3, 
2.14.0</strong>:<strong><code> propertyPrefix</code></strong>, 
<strong><code>propertySuffix</code></strong> configuration properties support 
the use of placeholders for de-referencing JVM system properties and OS 
environments variables.</p><p>Example:</p><p>Assume the 
<strong><code>PropertiesComponent</code></strong> is configured with the 
following properties file:</p>
+ <div class="code panel pdl" style="border-width: 1px;">
+  <div class="codeContent panelContent pdl"> 
+   <script class="brush: text; gutter: false; theme: Default" 
type="syntaxhighlighter">dev.endpoint = result1 test.endpoint = 
result2</script> 
   </div>
- </div><p>Then with the following route definition:</p>
+ </div><p>The same properties file is then referenced from a route 
definition:</p>
  <div class="code panel pdl" style="border-width: 1px;">
   <div class="codeContent panelContent pdl"> 
    <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter">PropertiesComponent pc = 
context.getComponent(&amp;quot;properties&amp;quot;, 
PropertiesComponent.class); 
pc.setPropertyPrefix(&amp;quot;${stage}.&amp;quot;); // ... 
context.addRoutes(new RouteBuilder() { @Override public void configure() throws 
Exception { from(&amp;quot;direct:start&amp;quot;) 
.to(&amp;quot;properties:mock:{{endpoint}}&amp;quot;); } });</script> 
   </div>
- </div><p>it is possible to change the target endpoint by changing system 
property&#160;<strong><code>stage</code></strong> either 
to&#160;<strong><code>dev</code></strong> (the message will be routed 
to&#160;<strong><code>mock:result1</code></strong>) 
or&#160;<strong><code>test</code></strong> (the message will be routed 
to&#160;<strong><code>mock:result2</code></strong>).</p><h3 
id="BookComponentAppendix-ConfiguringinJavaDSL">Configuring in Java 
DSL</h3><p>You have to create and register the 
<strong><code>PropertiesComponent</code></strong> under the name 
<strong><code>properties</code></strong> such as:</p>
+ </div><p>By using the configuration options 
<strong><code>propertyPrefix</code></strong> it's possible to change the target 
endpoint simply by changing the value of the system 
property&#160;<strong><code>stage</code></strong> either 
to&#160;<strong><code>dev</code></strong> (the message will be routed 
to&#160;<strong><code>mock:result1</code></strong>) 
or&#160;<strong><code>test</code></strong> (the message will be routed 
to&#160;<strong><code>mock:result2</code></strong>).</p><h3 
id="BookComponentAppendix-ConfiguringinJavaDSL">Configuring in Java 
DSL</h3><p>You have to create and register the 
<strong><code>PropertiesComponent</code></strong> under the name 
<strong><code>properties</code></strong> such as:</p>
  <div class="code panel pdl" style="border-width: 1px;">
   <div class="codeContent panelContent pdl"> 
    <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter">PropertiesComponent pc = new PropertiesComponent(); 
pc.setLocation(&amp;quot;classpath:com/mycompany/myprop.properties&amp;quot;); 
context.addComponent(&amp;quot;properties&amp;quot;, pc); </script> 
   </div>
- </div><h3 id="BookComponentAppendix-ConfiguringinSpringXML.1">Configuring in 
Spring XML</h3><p>Spring XML offers two variations to configure. You can define 
a spring bean as a <strong><code>PropertiesComponent</code></strong> which 
resembles the way done in Java DSL. Or you can use the 
<strong><code>&lt;propertyPlaceholder&gt;</code></strong> tag.</p>
+ </div><h3 id="BookComponentAppendix-ConfiguringinSpringXML">Configuring in 
Spring XML</h3><p>Spring XML offers two variations to configure. You can define 
a spring bean as a <strong><code>PropertiesComponent</code></strong> which 
resembles the way done in Java DSL. Or you can use the 
<strong><code>&lt;propertyPlaceholder&gt;</code></strong> tag.</p>
  <div class="code panel pdl" style="border-width: 1px;">
   <div class="codeContent panelContent pdl"> 
    <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter">&amp;lt;bean id=&amp;quot;properties&amp;quot; 
class=&amp;quot;org.apache.camel.component.properties.PropertiesComponent&amp;quot;&amp;gt;
 &amp;lt;property name=&amp;quot;location&amp;quot; 
value=&amp;quot;classpath:com/mycompany/myprop.properties&amp;quot;/&amp;gt; 
&amp;lt;/bean&amp;gt; </script> 
@@ -4658,7 +4663,7 @@ test.endpoint = result2</pre>
   <div class="codeContent panelContent pdl"> 
    <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter">&amp;lt;camelContext ...&amp;gt; 
&amp;lt;propertyPlaceholder id=&amp;quot;properties&amp;quot; 
location=&amp;quot;com/mycompany/myprop.properties&amp;quot;/&amp;gt; 
&amp;lt;/camelContext&amp;gt; </script> 
   </div>
- </div><p><span>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&#160;</span><strong>Camel 2.19.0</strong><span>&#160;you can set 
the properties location with a dedicated propertiesLocation:</span></p>
+ </div><p><span>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&#160;</span><strong>Camel 2.19.0</strong><span>&#160;you can set 
the properties location with a dedicated 
<strong><code>propertiesLocation</code></strong>:</span></p>
  <div class="code panel pdl" style="border-width: 1px;">
   <div class="codeContent panelContent pdl"> 
    <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter">&amp;lt;camelContext ...&amp;gt; 
&amp;lt;propertyPlaceholder 
id=&amp;quot;myPropertyPlaceholder&amp;quot;&amp;gt; &amp;lt;propertiesLocation 
resolver = &amp;quot;classpath&amp;quot; path = 
&amp;quot;com/my/company/something/my-properties-1.properties&amp;quot; 
optional = &amp;quot;false&amp;quot;/&amp;gt; &amp;lt;propertiesLocation 
resolver = &amp;quot;classpath&amp;quot; path = 
&amp;quot;com/my/company/something/my-properties-2.properties&amp;quot; 
optional = &amp;quot;false&amp;quot;/&amp;gt; &amp;lt;propertiesLocation 
resolver = &amp;quot;file&amp;quot; path = 
&amp;quot;${karaf.home}/etc/my-override.properties&amp;quot; optional = 
&amp;quot;true&amp;quot;/&amp;gt; &amp;lt;/propertyPlaceholder&amp;gt; 
&amp;lt;/camelContext&amp;gt;</script> 
@@ -4685,7 +4690,7 @@ test.endpoint = result2</pre>
   <div class="codeContent panelContent pdl"> 
    <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter">// properties cool.foo=result // route 
from(&amp;quot;direct:start&amp;quot;) 
.to(&amp;quot;properties:mock:{{cool.foo}}&amp;quot;); </script> 
   </div>
- </div><p>In the example above the to endpoint will be resolved to 
<code>mock:result</code>.</p><p>You can also have properties with refer to each 
other such as:</p>
+ </div><p>In the example above the to endpoint will be resolved to 
<strong><code>mock:result</code></strong>.</p><p>You can also have properties 
with refer to each other such as:</p>
  <div class="code panel pdl" style="border-width: 1px;">
   <div class="codeContent panelContent pdl"> 
    <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter">// properties cool.foo=result 
cool.concat=mock:{{cool.foo}} // route from(&amp;quot;direct:start&amp;quot;) 
.to(&amp;quot;properties:mock:{{cool.concat}}&amp;quot;); </script> 
@@ -4794,7 +4799,7 @@ test.endpoint = result2</pre>
    <div class="codeContent panelContent pdl"> 
     <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"> @Override protected String 
useOverridePropertiesWithConfigAdmin(Dictionary props) { // add the properties 
we want to override props.put(&amp;quot;greeting&amp;quot;, 
&amp;quot;Bye&amp;quot;); // return the PID of the config-admin we are using in 
the blueprint xml file return &amp;quot;my-placeholders&amp;quot;; } </script> 
    </div>
-  </div>&#160;<p>To do this we override and implement the 
<strong><code>useOverridePropertiesWithConfigAdmin</code></strong> method. We 
can then put the properties we want to override on the given props parameter. 
And the return value <em>must</em> be the persistence-id of 
the&#160;<strong><code>&lt;cm:property-placeholder&gt;</code></strong> tag, 
which you define in the blueprint XML file.</p><h4 
id="BookComponentAppendix-Usinga.cfgor.propertiesFileforBlueprintPropertyPlaceholders">Using
 a <code>.cfg</code> or&#160;<code>.properties</code> File for Blueprint 
Property Placeholders</h4><p><strong>Available as of Camel 
2.10.4</strong></p><p>When using Blueprint property placeholder in the 
Blueprint XML file, you can declare the properties in a .properties 
or&#160;<strong><code>.cfg</code></strong> 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 
<strong><code>etc/pid.cfg</code></s
 trong>, where&#160;<strong><code>pid</code></strong> is the 
persistence-id.</p><p>For example in the blueprint XML file we have the 
<strong><code>persistence-id="stuff"</code></strong>, which mean it will load 
the configuration file as <strong><code>etc/stuff.cfg</code></strong>.
+  </div>&#160;<p>To do this we override and implement the 
<strong><code>useOverridePropertiesWithConfigAdmin</code></strong> method. We 
can then put the properties we want to override on the given props parameter. 
And the return value <em>must</em> be the persistence-id of 
the&#160;<strong><code>&lt;cm:property-placeholder&gt;</code></strong> tag, 
which you define in the blueprint XML file.</p><h4 
id="BookComponentAppendix-Usinga.cfgor.propertiesFileforBlueprintPropertyPlaceholders">Using
 a <code>.cfg</code> or&#160;<code>.properties</code> File for Blueprint 
Property Placeholders</h4><p><strong>Available as of Camel 
2.10.4</strong></p><p>When using Blueprint property placeholder in the 
Blueprint XML file, you can declare the properties in a .properties 
or&#160;<strong><code>.cfg</code></strong> 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 
<strong><code>etc/pid.cfg</code></
 strong>, where&#160;<strong><code>pid</code></strong> is the 
persistence-id.</p><p>For example in the blueprint XML file we have the 
<strong><code>persistence-id="stuff"</code></strong>, which mean it will load 
the configuration file as <strong><code>etc/stuff.cfg</code></strong>.
   </p><div class="code panel pdl" style="border-width: 1px;">
    <div class="codeContent panelContent pdl"> 
     <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"> &amp;lt;!-- blueprint property placeholders, that 
will use etc/stuff.cfg as the properties file --&amp;gt; 
&amp;lt;cm:property-placeholder persistent-id=&amp;quot;stuff&amp;quot; 
update-strategy=&amp;quot;reload&amp;quot;/&amp;gt; &amp;lt;!-- a bean that 
uses a blueprint property placeholder --&amp;gt; &amp;lt;bean 
id=&amp;quot;myCoolBean&amp;quot; 
class=&amp;quot;org.apache.camel.test.blueprint.MyCoolBean&amp;quot;&amp;gt; 
&amp;lt;property name=&amp;quot;say&amp;quot; 
value=&amp;quot;${greeting}&amp;quot;/&amp;gt; &amp;lt;/bean&amp;gt; 
&amp;lt;camelContext 
xmlns=&amp;quot;http://camel.apache.org/schema/blueprint&amp;quot;&amp;gt; 
&amp;lt;route&amp;gt; &amp;lt;from 
uri=&amp;quot;direct:start&amp;quot;/&amp;gt; &amp;lt;bean 
ref=&amp;quot;myCoolBean&amp;quot; 
method=&amp;quot;saySomething&amp;quot;/&amp;gt; &amp;lt;to 
uri=&amp;quot;mock:result&amp;quot;/&amp;gt; &amp;lt;/route&amp;gt; 
&amp;lt;/came
 lContext&amp;gt; </script> 
@@ -4804,7 +4809,7 @@ test.endpoint = result2</pre>
    <div class="codeContent panelContent pdl"> 
     <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"> @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[]{&amp;quot;src/test/resources/etc/stuff.cfg&amp;quot;, 
&amp;quot;stuff&amp;quot;}; } </script> 
    </div>
-  </div>&#160;<p>Notice that this method requires to return 
a&#160;<strong><code>String[]</code></strong> with 2 values. The 1st value is 
the path for the configuration file to load. The 2nd value is the 
persistence-id of 
the&#160;<strong><code>&lt;cm:property-placeholder&gt;</code></strong> 
tag.</p><p>The&#160;<strong><code>stuff.cfg</code></strong> file is just a 
plain properties file with the property placeholders such as:</p>
+  </div>&#160;<p>Notice that this method requires to return 
a&#160;<strong><code>String[]</code></strong> with 2 values. The 1st value is 
the path for the configuration file to load. The second value is the 
persistence-id of 
the&#160;<strong><code>&lt;cm:property-placeholder&gt;</code></strong> 
tag.</p><p>The&#160;<strong><code>stuff.cfg</code></strong> file is just a 
plain properties file with the property placeholders such as:</p>
  <div class="code panel pdl" style="border-width: 1px;">
   <div class="codeContent panelContent pdl"> 
    <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter">## this is a comment greeting=Bye </script> 
@@ -4824,7 +4829,7 @@ test.endpoint = result2</pre>
   <div class="codeContent panelContent pdl"> 
    <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter">greeting=Bye echo=Yay destination=mock:result 
</script> 
   </div>
- </div><h3 
id="BookComponentAppendix-BridgingSpringandCamelPropertyPlaceholders">Bridging 
Spring and Camel Property Placeholders</h3><p><strong>Available as of Camel 
2.10</strong></p><p>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 
<strong><code>org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer</code></strong>,
 which is a Spring 
<strong><code>org.springframework.beans.factory.config.PropertyPlaceholderConfigurer</code></strong>
 type.</p><p>To bridge Spring and Camel you must define a single bean as shown 
below:
+ </div><h3 
id="BookComponentAppendix-BridgingSpringandCamelPropertyPlaceholders">Bridging 
Spring and Camel Property Placeholders</h3><p><strong>Available as of Camel 
2.10</strong></p><p>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 Spring 
bean with the type 
<strong><code>org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer</code></strong>,
 which is a Spring 
<strong><code>org.springframework.beans.factory.config.PropertyPlaceholderConfigurer</code></strong>
 type.</p><p>To bridge Spring and Camel you must define a single bean as shown 
below:
   </p><div class="code panel pdl" style="border-width: 1px;">
    <div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;">
     <b>Bridging Spring and Camel property placeholders</b>
@@ -4859,7 +4864,7 @@ test.endpoint = result2</pre>
    <div class="codeContent panelContent pdl"> 
     <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"> // override this method to provide our custom 
properties we use in this unit test @Override protected Properties 
useOverridePropertiesWithPropertiesComponent() { Properties extra = new 
Properties(); extra.put(&amp;quot;destination&amp;quot;, 
&amp;quot;mock:extra&amp;quot;); extra.put(&amp;quot;greeting&amp;quot;, 
&amp;quot;Bye&amp;quot;); return extra; } </script> 
    </div>
-  </div>&#160;<p>This can be done from any of the Camel Test kits, such as 
<code>camel-test</code>, <code>camel-test-spring</code> and 
<code>camel-test-blueprint</code>.</p><p>The 
<strong><code>ignoreMissingLocationWithPropertiesComponent</code></strong> 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.</p><h3 
id="BookComponentAppendix-Using@PropertyInject">Using&#160;<code>@PropertyInject</code></h3><p><strong>Available
 as of Camel 2.12</strong></p><p>Camel allows to inject property placeholders 
in POJOs using the&#160;<strong><code>@PropertyInject</code></strong> 
annotation which can be set on fields and setter methods. For example you can 
use that with <strong><code>RouteBuilder</code></strong> classes, such as shown 
below:</p>
+  </div>&#160;<p>This can be done from any of the Camel Test kits, such as 
<strong><code>camel-test</code></strong>, 
<strong><code>camel-test-spring</code></strong> and 
<strong><code>camel-test-blueprint</code></strong>.</p><p>The 
<strong><code>ignoreMissingLocationWithPropertiesComponent</code></strong> 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.</p><h3 
id="BookComponentAppendix-Using@PropertyInject">Using&#160;<code>@PropertyInject</code></h3><p><strong>Available
 as of Camel 2.12</strong></p><p>Camel allows to inject property placeholders 
in POJOs using the&#160;<strong><code>@PropertyInject</code></strong> 
annotation which can be set on fields and setter methods. For example you can 
use that with <strong><code>RouteBuilder</code></strong> classes, such as shown 
below:</p>
  <div class="code panel pdl" style="border-width: 1px;">
   <div class="codeContent panelContent pdl"> 
    <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter">public class MyRouteBuilder extends RouteBuilder { 
@PropertyInject(&amp;quot;hello&amp;quot;) private String greeting; @Override 
public void configure() throws Exception { 
from(&amp;quot;direct:start&amp;quot;) .transform().constant(greeting) 
.to(&amp;quot;{{result}}&amp;quot;); } } </script> 
@@ -4875,7 +4880,7 @@ test.endpoint = result2</pre>
    <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter">@PropertyInject(value = &amp;quot;myTimeout&amp;quot;, 
defaultValue = &amp;quot;5000&amp;quot;) private int timeout; </script> 
   </div>
  </div><h3 id="BookComponentAppendix-UsingOutoftheBoxFunctions">Using Out of 
the Box Functions</h3><p><strong>Available as of Camel 
2.14.1</strong></p><p>The&#160;<a shape="rect" 
href="properties.html">Properties</a>&#160;component includes the following 
functions out of the box</p>
- <ul><li><code>env</code> - A function to lookup the property from OS 
environment variables.</li><li><code>sys</code> - A function to lookup the 
property from Java JVM system properties.</li><li><code>service</code> - A 
function to lookup the property from OS environment variables using the service 
naming idiom.</li><li><code>service.host</code> - <strong>Camel 
2.16.1:&#160;</strong>A function to lookup the property&#160;from OS 
environment variables using the service naming idiom returning the hostname 
part only.</li><li><code>service.port</code> - <strong>Camel 
2.16.1:&#160;</strong>A function to lookup the property&#160;from OS 
environment variables using the service naming idiom returning the port part 
only.</li></ul><p>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:</p>
+ <ul><li><strong><code>env</code></strong> - A function to lookup the property 
from OS environment variables.</li><li><strong><code>sys</code></strong> - A 
function to lookup the property from Java JVM system 
properties.</li><li><strong><code>service</code></strong> - A function to 
lookup the property from OS environment variables using the service naming 
idiom.</li><li><strong><code>service.host</code></strong> - <strong>Camel 
2.16.1:&#160;</strong>A function to lookup the property&#160;from OS 
environment variables using the service naming idiom returning the hostname 
part only.</li><li><strong><code>service.port</code></strong> - <strong>Camel 
2.16.1:&#160;</strong>A function to lookup the property&#160;from OS 
environment variables using the service naming idiom returning the port part 
only.</li></ul><p>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:</p>
  <div class="code panel pdl" style="border-width: 1px;">
   <div class="codeContent panelContent pdl"> 
    <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter">&amp;lt;camelContext 
xmlns=&amp;quot;http://camel.apache.org/schema/blueprint&amp;quot;&amp;gt; 
&amp;lt;route&amp;gt; &amp;lt;from 
uri=&amp;quot;direct:start&amp;quot;/&amp;gt; &amp;lt;to 
uri=&amp;quot;{{env:SOMENAME}}&amp;quot;/&amp;gt; &amp;lt;to 
uri=&amp;quot;{{sys:MyJvmPropertyName}}&amp;quot;/&amp;gt; 
&amp;lt;/route&amp;gt; &amp;lt;/camelContext&amp;gt;</script> 

Modified: websites/production/camel/content/book-in-one-page.html
==============================================================================
--- websites/production/camel/content/book-in-one-page.html (original)
+++ websites/production/camel/content/book-in-one-page.html Wed Feb  1 18:19:58 
2017
@@ -3930,11 +3930,11 @@ The tutorial has been designed in two pa
 While not actual tutorials you might find working through the source of the 
various <a shape="rect" href="examples.html">Examples</a> useful.</li></ul>
 
 <h2 id="BookInOnePage-TutorialonSpringRemotingwithJMS">Tutorial on Spring 
Remoting with JMS</h2><p>&#160;</p><div class="confluence-information-macro 
confluence-information-macro-information"><p class="title">Thanks</p><span 
class="aui-icon aui-icon-small aui-iconfont-info 
confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>This tutorial was kindly donated 
to Apache Camel by Martin Gilday.</p></div></div><h2 
id="BookInOnePage-Preface">Preface</h2><p>This tutorial aims to guide the 
reader through the stages of creating a project which uses Camel to facilitate 
the routing of messages from a JMS queue to a <a shape="rect" 
class="external-link" href="http://www.springramework.org"; 
rel="nofollow">Spring</a> service. The route works in a synchronous fashion 
returning a response to the client.</p><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1485818270439 {padding: 0px;}
-div.rbtoc1485818270439 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1485818270439 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1485973100154 {padding: 0px;}
+div.rbtoc1485973100154 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1485973100154 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1485818270439">
+/*]]>*/</style></p><div class="toc-macro rbtoc1485973100154">
 <ul class="toc-indentation"><li><a shape="rect" 
href="#BookInOnePage-TutorialonSpringRemotingwithJMS">Tutorial on Spring 
Remoting with JMS</a></li><li><a shape="rect" 
href="#BookInOnePage-Preface">Preface</a></li><li><a shape="rect" 
href="#BookInOnePage-Prerequisites">Prerequisites</a></li><li><a shape="rect" 
href="#BookInOnePage-Distribution">Distribution</a></li><li><a shape="rect" 
href="#BookInOnePage-About">About</a></li><li><a shape="rect" 
href="#BookInOnePage-CreatetheCamelProject">Create the Camel Project</a>
 <ul class="toc-indentation"><li><a shape="rect" 
href="#BookInOnePage-UpdatethePOMwithDependencies">Update the POM with 
Dependencies</a></li></ul>
 </li><li><a shape="rect" href="#BookInOnePage-WritingtheServer">Writing the 
Server</a>
@@ -6049,11 +6049,11 @@ So we completed the last piece in the pi
 <p>This example has been removed from <strong>Camel 2.9</strong> onwards. 
Apache Axis 1.4 is a very old and unsupported framework. We encourage users to 
use <a shape="rect" href="cxf.html">CXF</a> instead of Axis.</p></div></div>
 
 <style type="text/css">/*<![CDATA[*/
-div.rbtoc1485818270674 {padding: 0px;}
-div.rbtoc1485818270674 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1485818270674 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1485973100892 {padding: 0px;}
+div.rbtoc1485973100892 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1485973100892 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style><div class="toc-macro rbtoc1485818270674">
+/*]]>*/</style><div class="toc-macro rbtoc1485973100892">
 <ul class="toc-indentation"><li><a shape="rect" 
href="#BookInOnePage-TutorialusingAxis1.4withApacheCamel">Tutorial using Axis 
1.4 with Apache Camel</a>
 <ul class="toc-indentation"><li><a shape="rect" 
href="#BookInOnePage-Prerequisites">Prerequisites</a></li><li><a shape="rect" 
href="#BookInOnePage-Distribution">Distribution</a></li><li><a shape="rect" 
href="#BookInOnePage-Introduction">Introduction</a></li><li><a shape="rect" 
href="#BookInOnePage-SettinguptheprojecttorunAxis">Setting up the project to 
run Axis</a>
 <ul class="toc-indentation"><li><a shape="rect" 
href="#BookInOnePage-Maven2">Maven 2</a></li><li><a shape="rect" 
href="#BookInOnePage-wsdl">wsdl</a></li><li><a shape="rect" 
href="#BookInOnePage-ConfiguringAxis">Configuring Axis</a></li><li><a 
shape="rect" href="#BookInOnePage-RunningtheExample">Running the 
Example</a></li></ul>
@@ -14234,8 +14234,8 @@ cometds://localhost:8443/service/mychann
  <div class="confluence-information-macro-body">
   <p>When using CXF in streaming modes (see DataFormat option), then also read 
about <a shape="rect" href="stream-caching.html">Stream caching</a>.</p>
  </div>
-</div><p>The <strong>cxf:</strong> component provides integration with <a 
shape="rect" href="http://cxf.apache.org";>Apache CXF</a> for connecting to 
JAX-WS services hosted in CXF.</p><p><style type="text/css">/**/ 
div.rbtoc1485818274472 {padding: 0px;} div.rbtoc1485818274472 ul {list-style: 
disc;margin-left: 0px;} div.rbtoc1485818274472 li {margin-left: 
0px;padding-left: 0px;} /**/</style>
- </p><div class="toc-macro rbtoc1485818274472"> 
+</div><p>The <strong>cxf:</strong> component provides integration with <a 
shape="rect" href="http://cxf.apache.org";>Apache CXF</a> for connecting to 
JAX-WS services hosted in CXF.</p><p><style type="text/css">/**/ 
div.rbtoc1485973123869 {padding: 0px;} div.rbtoc1485973123869 ul {list-style: 
disc;margin-left: 0px;} div.rbtoc1485973123869 li {margin-left: 
0px;padding-left: 0px;} /**/</style>
+ </p><div class="toc-macro rbtoc1485973123869"> 
   <ul class="toc-indentation"><li><a shape="rect" 
href="#BookInOnePage-CXFComponent">CXF Component</a> 
     <ul class="toc-indentation"><li><a shape="rect" 
href="#BookInOnePage-URIformat">URI format</a></li><li><a shape="rect" 
href="#BookInOnePage-Options">Options</a> 
       <ul class="toc-indentation"><li><a shape="rect" 
href="#BookInOnePage-Thedescriptionsofthedataformats">The descriptions of the 
dataformats</a> 
@@ -18195,38 +18195,44 @@ cometds://localhost:8443/service/mychann
  <div class="confluence-information-macro-body">
   <p>You can use the method 
<strong><code>resolvePropertyPlaceholders</code></strong> on the 
<strong><code>CamelContext</code></strong> to resolve a property from any Java 
code.</p>
  </div>
-</div><p></p><h2 
id="BookInOnePage-UsingPropertyPlaceholder">Using&#160;<code>PropertyPlaceholder</code></h2><p><strong>Available
 as of Camel 2.3</strong></p><p>Camel now provides a new 
<strong><code>PropertiesComponent</code></strong> in 
<strong>camel-core</strong> which allows you to use property placeholders when 
defining Camel <a shape="rect" href="endpoint.html">Endpoint</a> URIs. This 
works much like you would do if using Spring's 
<strong><code>&lt;property-placeholder&gt;</code></strong> tag. However Spring 
has a limitation that prevents 3rd party frameworks from fully leveraging 
Spring property placeholders.</p><p>For more details see: <a shape="rect" 
href="how-do-i-use-spring-property-placeholder-with-camel-xml.html">How do I 
use Spring Property Placeholder with Camel XML</a>.</p>
+</div><p></p><h2 
id="BookInOnePage-UsingPropertyPlaceholder">Using&#160;<strong><code>PropertyPlaceholder</code></strong></h2><p><strong>Available
 as of Camel 2.3</strong></p><p>Camel now provides a new 
<strong><code>PropertiesComponent</code></strong> 
in&#160;<strong><code>camel-core</code></strong> which allows you to use 
property placeholders when defining Camel <a shape="rect" 
href="endpoint.html">Endpoint</a> URIs. This works much like you would do if 
using Spring's <strong><code>&lt;property-placeholder&gt;</code></strong> tag. 
However Spring has a limitation that prevents third-party frameworks from fully 
leveraging Spring property placeholders.</p><p>For more details see: <a 
shape="rect" 
href="how-do-i-use-spring-property-placeholder-with-camel-xml.html">How do I 
use Spring Property Placeholder with Camel XML</a>.</p>
  <div class="confluence-information-macro confluence-information-macro-tip">
   <p class="title">Bridging Spring and Camel property placeholders</p>
   <span class="aui-icon aui-icon-small aui-iconfont-approve 
confluence-information-macro-icon"></span>
   <div class="confluence-information-macro-body">
    <p>From <strong>Camel 2.10</strong>: Spring's property placeholder can be 
bridged with Camel's. See below for more details.</p>
   </div>
- </div><p>The property placeholder is generally in use when doing any of the 
following:</p>
- <ul class="alternate"><li>lookup or creating endpoints.</li><li>lookup of 
beans in the <a shape="rect" 
href="registry.html">Registry.</a></li><li>additional supported in Spring XML 
(see below in examples).</li><li>using 
Blueprint&#160;<strong><code>PropertyPlaceholder</code></strong> with Camel <a 
shape="rect" href="properties.html">Properties</a> component.</li><li>using 
<strong><code>@PropertyInject</code></strong> to inject a property in a 
POJO.</li><li><strong>Camel 2.14.1</strong> Using default value if a property 
does not exists.</li><li><strong>Camel 2.14.1</strong> Include out of the box 
functions, to lookup property values from OS environment variables, JVM system 
properties, or the service idiom.</li><li><strong>Camel 2.14.1</strong> Using 
custom functions, which can be plugged into the property 
component.</li></ul><h3 id="BookInOnePage-Syntax.1">Syntax</h3><p>The syntax to 
use Camel's property placeholder is to use 
<strong>{{<code>key</code>}}</strong> for example <stron
 g>{{<code>file.uri</code>}}</strong> where 
<strong><code>file.uri</code></strong> 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.</p><p>From&#160;<strong>Camel 
2.14.1</strong>: you can specify a default value to use if a property with the 
key does not exists, e.g., <strong><code>file.url:/some/path</code></strong> 
where the default value is the text after the colon, e.g., 
<strong><code>/some/path</code></strong>.</p>
+ </div><p>The property placeholder is typically used when trying to do any of 
the following:</p>
+ <ul class="alternate"><li>Lookup or creating endpoints.</li><li>Lookup of 
beans in the <a shape="rect" 
href="registry.html">Registry.</a></li><li>Additional supported in Spring XML 
(see below in examples).</li><li>Using 
Blueprint&#160;<strong><code>PropertyPlaceholder</code></strong> with Camel <a 
shape="rect" href="properties.html">Properties</a> component.</li><li>Using 
<strong><code>@PropertyInject</code></strong> to inject a property in a 
POJO.</li><li><strong>Camel 2.14.1</strong> Using default value if a property 
does not exists.</li><li><strong>Camel 2.14.1</strong> Include out of the box 
functions, to lookup property values from OS environment variables, JVM system 
properties, or the service idiom.</li><li><strong>Camel 2.14.1</strong> Using 
custom functions, which can be plugged into the property 
component.</li></ul><h3 id="BookInOnePage-Format">Format</h3><p>The value of a 
Camel property can be obtained by specifying its key name within a property 
placeholder, using the f
 ollowing format: <strong>{{<code>key</code>}}</strong>.</p><p>For example:</p>
+ <div class="code panel pdl" style="border-width: 1px;">
+  <div class="codeContent panelContent pdl"> 
+   <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter">{{file.uri}}</script> 
+  </div>
+ </div><p>where <strong><code>file.uri</code></strong> is the property 
key.</p><p>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.</p><p>From&#160;<strong>Camel 2.14.1</strong>: you can specify a 
default value to use if a property with the key does not exists, e.g., 
<strong><code>file.url:/some/path</code></strong> where the default value is 
the text after the colon, e.g., <strong><code>/some/path</code></strong>.</p>
  <div class="confluence-information-macro 
confluence-information-macro-information">
   <span class="aui-icon aui-icon-small aui-iconfont-info 
confluence-information-macro-icon"></span>
   <div class="confluence-information-macro-body">
    <p>From <strong>Camel 2.14.1</strong>: do <em>not</em> use a colon in the 
property key. The colon character is used as a token separator when providing a 
default value.</p>
   </div>
- </div><h3 
id="BookInOnePage-UsingPropertyResolver">Using&#160;<code>PropertyResolver</code></h3><p>Camel
 provides a pluggable mechanism which allows 3rd part to provide their own 
resolver to lookup properties. Camel provides a default implementation 
<strong><code>org.apache.camel.component.properties.DefaultPropertiesResolver</code></strong>
 which is capable of loading properties from the file system, classpath or <a 
shape="rect" href="registry.html">Registry</a>. You can prefix the locations 
with either:</p>
- <ul class="alternate"><li><strong><code>ref:</code> Camel 2.4:</strong> to 
lookup in the <a shape="rect" 
href="registry.html">Registry.</a></li><li><strong><code>file:</code></strong> 
to load the from file system.</li><li><strong><code>classpath:</code></strong> 
to load from classpath (this is also the default if no prefix is 
provided).</li><li><strong><code>blueprint:</code> Camel 2.7:</strong> to use a 
specific OSGi blueprint placeholder service.</li></ul><h3 
id="BookInOnePage-DefiningLocation">Defining Location</h3><p>The 
<strong><code>PropertiesResolver</code></strong> need 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:</p>
+ </div><h3 
id="BookInOnePage-UsingPropertyResolver">Using&#160;<code>PropertyResolver</code></h3><p>Camel
 provides a pluggable mechanism that allows third-parties to specify their own 
resolver to use for the lookup of properties.</p><p>Camel provides a default 
implementation 
<strong><code>org.apache.camel.component.properties.DefaultPropertiesResolver</code></strong>
 which is capable of loading properties from the file system, classpath or <a 
shape="rect" href="registry.html">Registry</a>. To indicate which source to use 
the location must contain the appropriate prefix.</p><p>The list of prefixes 
is:</p>
+ <div class="table-wrap">
+  <table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Prefix</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>ref:</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Lookup in the <a shape="rect" 
href="registry.html">Registry.</a></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>file:</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Load the from file system.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>classpath:</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Load from the classpath (this is also the 
default if no prefix is provided).</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>blueprint:</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Use a specific OSGi blueprint placeholder 
service.</
 p></td></tr></tbody></table>
+ </div><h3 id="BookInOnePage-DefiningLocation">Defining Location</h3><p>The 
<strong><code>PropertiesResolver</code></strong> 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.</p>
  <div class="code panel pdl" style="border-width: 1px;">
   <div class="codeContent panelContent pdl"> 
-   <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter">pc.setLocation(&amp;quot;com/mycompany/myprop.properties,com/mycompany/other.properties&amp;quot;);
 </script> 
+   <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter">pc.setLocation(&amp;quot;com/mycompany/myprop.properties,com/mycompany/other.properties&amp;quot;);
 pc.setLocation(new String[] 
{&amp;quot;com/mycompany/myprop.properties&amp;quot;, 
&amp;quot;com/mycompany/other.properties&amp;quot;});&nbsp;</script> 
   </div>
  </div>
  <div>
-  <p><span><br clear="none"></span></p>
-  <p><strong>Available as of Camel 2.19.0</strong></p>
-  <p>You can set which location can be discarded if missing by by setting 
the&#160;<code>optional</code>&#160;attribute, which is false by default, 
i.e:</p>
+  <p>&#160;</p>
+  <p>From<strong> Camel 2.19.0</strong>: you can set which location can be 
discarded if missing by setting&#160; 
<strong><code>optional=true</code></strong>, 
(<strong><code>false</code></strong> by default).</p>
+  <p>Example:</p>
  </div>
  <div>
-  <h4 id="BookInOnePage-ConfiguringinSpringXML">Configuring in Spring XML</h4>
   <p>&#160;</p>
   <div class="code panel pdl" style="border-width: 1px;">
    <div class="codeContent panelContent pdl"> 
-    <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter">pc.setLocations( 
&amp;quot;com/mycompany/override.properties;optional=true&amp;quot; 
&amp;quot;com/mycompany/defaults.properties&amp;quot;);</script> 
+    <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter">pc.setLocations(&amp;quot;com/mycompany/override.properties;optional=true,com/mycompany/defaults.properties&amp;quot;);</script>
 
    </div>
   </div>
   <p>&#160;</p>
@@ -18240,28 +18246,27 @@ cometds://localhost:8443/service/mychann
   <div class="codeContent panelContent pdl"> 
    <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter">location=file:${env:APP_HOME}/etc/foo.properties 
</script> 
   </div>
- </div><p>Where <strong><code>APP_HOME</code></strong> is an OS 
environment.</p><p>You can have multiple placeholders in the same location, 
such as:</p>
+ </div><p>Where <strong><code>APP_HOME</code></strong> is an OS environment 
variable.</p><p>You can have multiple placeholders in the same location, such 
as:</p>
  <div class="code panel pdl" style="border-width: 1px;">
   <div class="codeContent panelContent pdl"> 
    <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter">location=file:${env:APP_HOME}/etc/${prop.name}.properties
 </script> 
   </div>
- </div><h4 
id="BookInOnePage-UsingSystemandEnvironmentVariablestoConfigurePropertyPrefixesandSuffixes">Using
 System and Environment Variables to Configure Property Prefixes and 
Suffixes</h4><p><strong>Available as of Camel 2.12.5, 2.13.3, 
2.14.0</strong></p><p><strong><code>propertyPrefix</code></strong>, 
<strong><code>propertySuffix</code></strong> configuration properties support 
using placeholders for JVM system properties and OS environments 
variables.</p><p>For example, 
if&#160;<strong><code>PropertiesComponent</code></strong> is configured with 
the following properties file:</p>
- <div class="preformatted panel" style="border-width: 1px;">
-  <div class="preformattedContent panelContent"> 
-   <pre>dev.endpoint = result1
-test.endpoint = result2</pre> 
+ </div><h4 
id="BookInOnePage-UsingSystemorEnvironmentVariablestoConfigurePropertyPrefixesandSuffixes">Using
 System or Environment Variables to Configure Property Prefixes and 
Suffixes</h4><p>From<strong> Camel 2.12.5, 2.13.3, 
2.14.0</strong>:<strong><code> propertyPrefix</code></strong>, 
<strong><code>propertySuffix</code></strong> configuration properties support 
the use of placeholders for de-referencing JVM system properties and OS 
environments variables.</p><p>Example:</p><p>Assume the 
<strong><code>PropertiesComponent</code></strong> is configured with the 
following properties file:</p>
+ <div class="code panel pdl" style="border-width: 1px;">
+  <div class="codeContent panelContent pdl"> 
+   <script class="brush: text; gutter: false; theme: Default" 
type="syntaxhighlighter">dev.endpoint = result1 test.endpoint = 
result2</script> 
   </div>
- </div><p>Then with the following route definition:</p>
+ </div><p>The same properties file is then referenced from a route 
definition:</p>
  <div class="code panel pdl" style="border-width: 1px;">
   <div class="codeContent panelContent pdl"> 
    <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter">PropertiesComponent pc = 
context.getComponent(&amp;quot;properties&amp;quot;, 
PropertiesComponent.class); 
pc.setPropertyPrefix(&amp;quot;${stage}.&amp;quot;); // ... 
context.addRoutes(new RouteBuilder() { @Override public void configure() throws 
Exception { from(&amp;quot;direct:start&amp;quot;) 
.to(&amp;quot;properties:mock:{{endpoint}}&amp;quot;); } });</script> 
   </div>
- </div><p>it is possible to change the target endpoint by changing system 
property&#160;<strong><code>stage</code></strong> either 
to&#160;<strong><code>dev</code></strong> (the message will be routed 
to&#160;<strong><code>mock:result1</code></strong>) 
or&#160;<strong><code>test</code></strong> (the message will be routed 
to&#160;<strong><code>mock:result2</code></strong>).</p><h3 
id="BookInOnePage-ConfiguringinJavaDSL">Configuring in Java DSL</h3><p>You have 
to create and register the <strong><code>PropertiesComponent</code></strong> 
under the name <strong><code>properties</code></strong> such as:</p>
+ </div><p>By using the configuration options 
<strong><code>propertyPrefix</code></strong> it's possible to change the target 
endpoint simply by changing the value of the system 
property&#160;<strong><code>stage</code></strong> either 
to&#160;<strong><code>dev</code></strong> (the message will be routed 
to&#160;<strong><code>mock:result1</code></strong>) 
or&#160;<strong><code>test</code></strong> (the message will be routed 
to&#160;<strong><code>mock:result2</code></strong>).</p><h3 
id="BookInOnePage-ConfiguringinJavaDSL">Configuring in Java DSL</h3><p>You have 
to create and register the <strong><code>PropertiesComponent</code></strong> 
under the name <strong><code>properties</code></strong> such as:</p>
  <div class="code panel pdl" style="border-width: 1px;">
   <div class="codeContent panelContent pdl"> 
    <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter">PropertiesComponent pc = new PropertiesComponent(); 
pc.setLocation(&amp;quot;classpath:com/mycompany/myprop.properties&amp;quot;); 
context.addComponent(&amp;quot;properties&amp;quot;, pc); </script> 
   </div>
- </div><h3 id="BookInOnePage-ConfiguringinSpringXML.1">Configuring in Spring 
XML</h3><p>Spring XML offers two variations to configure. You can define a 
spring bean as a <strong><code>PropertiesComponent</code></strong> which 
resembles the way done in Java DSL. Or you can use the 
<strong><code>&lt;propertyPlaceholder&gt;</code></strong> tag.</p>
+ </div><h3 id="BookInOnePage-ConfiguringinSpringXML">Configuring in Spring 
XML</h3><p>Spring XML offers two variations to configure. You can define a 
spring bean as a <strong><code>PropertiesComponent</code></strong> which 
resembles the way done in Java DSL. Or you can use the 
<strong><code>&lt;propertyPlaceholder&gt;</code></strong> tag.</p>
  <div class="code panel pdl" style="border-width: 1px;">
   <div class="codeContent panelContent pdl"> 
    <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter">&amp;lt;bean id=&amp;quot;properties&amp;quot; 
class=&amp;quot;org.apache.camel.component.properties.PropertiesComponent&amp;quot;&amp;gt;
 &amp;lt;property name=&amp;quot;location&amp;quot; 
value=&amp;quot;classpath:com/mycompany/myprop.properties&amp;quot;/&amp;gt; 
&amp;lt;/bean&amp;gt; </script> 
@@ -18271,7 +18276,7 @@ test.endpoint = result2</pre>
   <div class="codeContent panelContent pdl"> 
    <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter">&amp;lt;camelContext ...&amp;gt; 
&amp;lt;propertyPlaceholder id=&amp;quot;properties&amp;quot; 
location=&amp;quot;com/mycompany/myprop.properties&amp;quot;/&amp;gt; 
&amp;lt;/camelContext&amp;gt; </script> 
   </div>
- </div><p><span>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&#160;</span><strong>Camel 2.19.0</strong><span>&#160;you can set 
the properties location with a dedicated propertiesLocation:</span></p>
+ </div><p><span>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&#160;</span><strong>Camel 2.19.0</strong><span>&#160;you can set 
the properties location with a dedicated 
<strong><code>propertiesLocation</code></strong>:</span></p>
  <div class="code panel pdl" style="border-width: 1px;">
   <div class="codeContent panelContent pdl"> 
    <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter">&amp;lt;camelContext ...&amp;gt; 
&amp;lt;propertyPlaceholder 
id=&amp;quot;myPropertyPlaceholder&amp;quot;&amp;gt; &amp;lt;propertiesLocation 
resolver = &amp;quot;classpath&amp;quot; path = 
&amp;quot;com/my/company/something/my-properties-1.properties&amp;quot; 
optional = &amp;quot;false&amp;quot;/&amp;gt; &amp;lt;propertiesLocation 
resolver = &amp;quot;classpath&amp;quot; path = 
&amp;quot;com/my/company/something/my-properties-2.properties&amp;quot; 
optional = &amp;quot;false&amp;quot;/&amp;gt; &amp;lt;propertiesLocation 
resolver = &amp;quot;file&amp;quot; path = 
&amp;quot;${karaf.home}/etc/my-override.properties&amp;quot; optional = 
&amp;quot;true&amp;quot;/&amp;gt; &amp;lt;/propertyPlaceholder&amp;gt; 
&amp;lt;/camelContext&amp;gt;</script> 
@@ -18298,7 +18303,7 @@ test.endpoint = result2</pre>
   <div class="codeContent panelContent pdl"> 
    <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter">// properties cool.foo=result // route 
from(&amp;quot;direct:start&amp;quot;) 
.to(&amp;quot;properties:mock:{{cool.foo}}&amp;quot;); </script> 
   </div>
- </div><p>In the example above the to endpoint will be resolved to 
<code>mock:result</code>.</p><p>You can also have properties with refer to each 
other such as:</p>
+ </div><p>In the example above the to endpoint will be resolved to 
<strong><code>mock:result</code></strong>.</p><p>You can also have properties 
with refer to each other such as:</p>
  <div class="code panel pdl" style="border-width: 1px;">
   <div class="codeContent panelContent pdl"> 
    <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter">// properties cool.foo=result 
cool.concat=mock:{{cool.foo}} // route from(&amp;quot;direct:start&amp;quot;) 
.to(&amp;quot;properties:mock:{{cool.concat}}&amp;quot;); </script> 
@@ -18407,7 +18412,7 @@ test.endpoint = result2</pre>
    <div class="codeContent panelContent pdl"> 
     <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"> @Override protected String 
useOverridePropertiesWithConfigAdmin(Dictionary props) { // add the properties 
we want to override props.put(&amp;quot;greeting&amp;quot;, 
&amp;quot;Bye&amp;quot;); // return the PID of the config-admin we are using in 
the blueprint xml file return &amp;quot;my-placeholders&amp;quot;; } </script> 
    </div>
-  </div>&#160;<p>To do this we override and implement the 
<strong><code>useOverridePropertiesWithConfigAdmin</code></strong> method. We 
can then put the properties we want to override on the given props parameter. 
And the return value <em>must</em> be the persistence-id of 
the&#160;<strong><code>&lt;cm:property-placeholder&gt;</code></strong> tag, 
which you define in the blueprint XML file.</p><h4 
id="BookInOnePage-Usinga.cfgor.propertiesFileforBlueprintPropertyPlaceholders">Using
 a <code>.cfg</code> or&#160;<code>.properties</code> File for Blueprint 
Property Placeholders</h4><p><strong>Available as of Camel 
2.10.4</strong></p><p>When using Blueprint property placeholder in the 
Blueprint XML file, you can declare the properties in a .properties 
or&#160;<strong><code>.cfg</code></strong> 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 
<strong><code>etc/pid.cfg</code></strong>, 
 where&#160;<strong><code>pid</code></strong> is the persistence-id.</p><p>For 
example in the blueprint XML file we have the 
<strong><code>persistence-id="stuff"</code></strong>, which mean it will load 
the configuration file as <strong><code>etc/stuff.cfg</code></strong>.
+  </div>&#160;<p>To do this we override and implement the 
<strong><code>useOverridePropertiesWithConfigAdmin</code></strong> method. We 
can then put the properties we want to override on the given props parameter. 
And the return value <em>must</em> be the persistence-id of 
the&#160;<strong><code>&lt;cm:property-placeholder&gt;</code></strong> tag, 
which you define in the blueprint XML file.</p><h4 
id="BookInOnePage-Usinga.cfgor.propertiesFileforBlueprintPropertyPlaceholders">Using
 a <code>.cfg</code> or&#160;<code>.properties</code> File for Blueprint 
Property Placeholders</h4><p><strong>Available as of Camel 
2.10.4</strong></p><p>When using Blueprint property placeholder in the 
Blueprint XML file, you can declare the properties in a .properties 
or&#160;<strong><code>.cfg</code></strong> 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 
<strong><code>etc/pid.cfg</code></strong>,
  where&#160;<strong><code>pid</code></strong> is the persistence-id.</p><p>For 
example in the blueprint XML file we have the 
<strong><code>persistence-id="stuff"</code></strong>, which mean it will load 
the configuration file as <strong><code>etc/stuff.cfg</code></strong>.
   </p><div class="code panel pdl" style="border-width: 1px;">
    <div class="codeContent panelContent pdl"> 
     <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"> &amp;lt;!-- blueprint property placeholders, that 
will use etc/stuff.cfg as the properties file --&amp;gt; 
&amp;lt;cm:property-placeholder persistent-id=&amp;quot;stuff&amp;quot; 
update-strategy=&amp;quot;reload&amp;quot;/&amp;gt; &amp;lt;!-- a bean that 
uses a blueprint property placeholder --&amp;gt; &amp;lt;bean 
id=&amp;quot;myCoolBean&amp;quot; 
class=&amp;quot;org.apache.camel.test.blueprint.MyCoolBean&amp;quot;&amp;gt; 
&amp;lt;property name=&amp;quot;say&amp;quot; 
value=&amp;quot;${greeting}&amp;quot;/&amp;gt; &amp;lt;/bean&amp;gt; 
&amp;lt;camelContext 
xmlns=&amp;quot;http://camel.apache.org/schema/blueprint&amp;quot;&amp;gt; 
&amp;lt;route&amp;gt; &amp;lt;from 
uri=&amp;quot;direct:start&amp;quot;/&amp;gt; &amp;lt;bean 
ref=&amp;quot;myCoolBean&amp;quot; 
method=&amp;quot;saySomething&amp;quot;/&amp;gt; &amp;lt;to 
uri=&amp;quot;mock:result&amp;quot;/&amp;gt; &amp;lt;/route&amp;gt; 
&amp;lt;/came
 lContext&amp;gt; </script> 
@@ -18417,7 +18422,7 @@ test.endpoint = result2</pre>
    <div class="codeContent panelContent pdl"> 
     <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"> @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[]{&amp;quot;src/test/resources/etc/stuff.cfg&amp;quot;, 
&amp;quot;stuff&amp;quot;}; } </script> 
    </div>
-  </div>&#160;<p>Notice that this method requires to return 
a&#160;<strong><code>String[]</code></strong> with 2 values. The 1st value is 
the path for the configuration file to load. The 2nd value is the 
persistence-id of 
the&#160;<strong><code>&lt;cm:property-placeholder&gt;</code></strong> 
tag.</p><p>The&#160;<strong><code>stuff.cfg</code></strong> file is just a 
plain properties file with the property placeholders such as:</p>
+  </div>&#160;<p>Notice that this method requires to return 
a&#160;<strong><code>String[]</code></strong> with 2 values. The 1st value is 
the path for the configuration file to load. The second value is the 
persistence-id of 
the&#160;<strong><code>&lt;cm:property-placeholder&gt;</code></strong> 
tag.</p><p>The&#160;<strong><code>stuff.cfg</code></strong> file is just a 
plain properties file with the property placeholders such as:</p>
  <div class="code panel pdl" style="border-width: 1px;">
   <div class="codeContent panelContent pdl"> 
    <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter">## this is a comment greeting=Bye </script> 
@@ -18437,7 +18442,7 @@ test.endpoint = result2</pre>
   <div class="codeContent panelContent pdl"> 
    <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter">greeting=Bye echo=Yay destination=mock:result 
</script> 
   </div>
- </div><h3 
id="BookInOnePage-BridgingSpringandCamelPropertyPlaceholders">Bridging Spring 
and Camel Property Placeholders</h3><p><strong>Available as of Camel 
2.10</strong></p><p>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 
<strong><code>org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer</code></strong>,
 which is a Spring 
<strong><code>org.springframework.beans.factory.config.PropertyPlaceholderConfigurer</code></strong>
 type.</p><p>To bridge Spring and Camel you must define a single bean as shown 
below:
+ </div><h3 
id="BookInOnePage-BridgingSpringandCamelPropertyPlaceholders">Bridging Spring 
and Camel Property Placeholders</h3><p><strong>Available as of Camel 
2.10</strong></p><p>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 Spring 
bean with the type 
<strong><code>org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer</code></strong>,
 which is a Spring 
<strong><code>org.springframework.beans.factory.config.PropertyPlaceholderConfigurer</code></strong>
 type.</p><p>To bridge Spring and Camel you must define a single bean as shown 
below:
   </p><div class="code panel pdl" style="border-width: 1px;">
    <div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;">
     <b>Bridging Spring and Camel property placeholders</b>
@@ -18472,7 +18477,7 @@ test.endpoint = result2</pre>
    <div class="codeContent panelContent pdl"> 
     <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"> // override this method to provide our custom 
properties we use in this unit test @Override protected Properties 
useOverridePropertiesWithPropertiesComponent() { Properties extra = new 
Properties(); extra.put(&amp;quot;destination&amp;quot;, 
&amp;quot;mock:extra&amp;quot;); extra.put(&amp;quot;greeting&amp;quot;, 
&amp;quot;Bye&amp;quot;); return extra; } </script> 
    </div>
-  </div>&#160;<p>This can be done from any of the Camel Test kits, such as 
<code>camel-test</code>, <code>camel-test-spring</code> and 
<code>camel-test-blueprint</code>.</p><p>The 
<strong><code>ignoreMissingLocationWithPropertiesComponent</code></strong> 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.</p><h3 
id="BookInOnePage-Using@PropertyInject">Using&#160;<code>@PropertyInject</code></h3><p><strong>Available
 as of Camel 2.12</strong></p><p>Camel allows to inject property placeholders 
in POJOs using the&#160;<strong><code>@PropertyInject</code></strong> 
annotation which can be set on fields and setter methods. For example you can 
use that with <strong><code>RouteBuilder</code></strong> classes, such as shown 
below:</p>
+  </div>&#160;<p>This can be done from any of the Camel Test kits, such as 
<strong><code>camel-test</code></strong>, 
<strong><code>camel-test-spring</code></strong> and 
<strong><code>camel-test-blueprint</code></strong>.</p><p>The 
<strong><code>ignoreMissingLocationWithPropertiesComponent</code></strong> 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.</p><h3 
id="BookInOnePage-Using@PropertyInject">Using&#160;<code>@PropertyInject</code></h3><p><strong>Available
 as of Camel 2.12</strong></p><p>Camel allows to inject property placeholders 
in POJOs using the&#160;<strong><code>@PropertyInject</code></strong> 
annotation which can be set on fields and setter methods. For example you can 
use that with <strong><code>RouteBuilder</code></strong> classes, such as shown 
below:</p>
  <div class="code panel pdl" style="border-width: 1px;">
   <div class="codeContent panelContent pdl"> 
    <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter">public class MyRouteBuilder extends RouteBuilder { 
@PropertyInject(&amp;quot;hello&amp;quot;) private String greeting; @Override 
public void configure() throws Exception { 
from(&amp;quot;direct:start&amp;quot;) .transform().constant(greeting) 
.to(&amp;quot;{{result}}&amp;quot;); } } </script> 
@@ -18488,7 +18493,7 @@ test.endpoint = result2</pre>
    <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter">@PropertyInject(value = &amp;quot;myTimeout&amp;quot;, 
defaultValue = &amp;quot;5000&amp;quot;) private int timeout; </script> 
   </div>
  </div><h3 id="BookInOnePage-UsingOutoftheBoxFunctions">Using Out of the Box 
Functions</h3><p><strong>Available as of Camel 
2.14.1</strong></p><p>The&#160;<a shape="rect" 
href="properties.html">Properties</a>&#160;component includes the following 
functions out of the box</p>
- <ul><li><code>env</code> - A function to lookup the property from OS 
environment variables.</li><li><code>sys</code> - A function to lookup the 
property from Java JVM system properties.</li><li><code>service</code> - A 
function to lookup the property from OS environment variables using the service 
naming idiom.</li><li><code>service.host</code> - <strong>Camel 
2.16.1:&#160;</strong>A function to lookup the property&#160;from OS 
environment variables using the service naming idiom returning the hostname 
part only.</li><li><code>service.port</code> - <strong>Camel 
2.16.1:&#160;</strong>A function to lookup the property&#160;from OS 
environment variables using the service naming idiom returning the port part 
only.</li></ul><p>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:</p>
+ <ul><li><strong><code>env</code></strong> - A function to lookup the property 
from OS environment variables.</li><li><strong><code>sys</code></strong> - A 
function to lookup the property from Java JVM system 
properties.</li><li><strong><code>service</code></strong> - A function to 
lookup the property from OS environment variables using the service naming 
idiom.</li><li><strong><code>service.host</code></strong> - <strong>Camel 
2.16.1:&#160;</strong>A function to lookup the property&#160;from OS 
environment variables using the service naming idiom returning the hostname 
part only.</li><li><strong><code>service.port</code></strong> - <strong>Camel 
2.16.1:&#160;</strong>A function to lookup the property&#160;from OS 
environment variables using the service naming idiom returning the port part 
only.</li></ul><p>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:</p>
  <div class="code panel pdl" style="border-width: 1px;">
   <div class="codeContent panelContent pdl"> 
    <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter">&amp;lt;camelContext 
xmlns=&amp;quot;http://camel.apache.org/schema/blueprint&amp;quot;&amp;gt; 
&amp;lt;route&amp;gt; &amp;lt;from 
uri=&amp;quot;direct:start&amp;quot;/&amp;gt; &amp;lt;to 
uri=&amp;quot;{{env:SOMENAME}}&amp;quot;/&amp;gt; &amp;lt;to 
uri=&amp;quot;{{sys:MyJvmPropertyName}}&amp;quot;/&amp;gt; 
&amp;lt;/route&amp;gt; &amp;lt;/camelContext&amp;gt;</script> 

Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.


Reply via email to