You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bu...@apache.org on 2016/11/04 16:21:17 UTC

svn commit: r1000488 [2/2] - in /websites/production/camel/content: async.html book-component-appendix.html book-in-one-page.html cache/main.pageCache camel-219-release.html properties.html using-propertyplaceholder.html

Modified: websites/production/camel/content/camel-219-release.html
==============================================================================
--- websites/production/camel/content/camel-219-release.html (original)
+++ websites/production/camel/content/camel-219-release.html Fri Nov  4 16:21:17 2016
@@ -85,7 +85,7 @@
 	<tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h1 id="Camel2.19Release-Camel2.19.0Release(currentlyinprogress)">Camel 2.19.0 Release (currently in progress)</h1><div style="padding-right:20px;float:left;margin-left:-20px;"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://camel.apache.org/images/camel-box-small.png" data-image-src="http://camel.apache.org/images/camel-box-small.png"></span></div><div style="min-height:200px">&#160;</div><h2 id="Camel2.19Release-NewandNoteworthy">New and Noteworthy</h2><p>Welcome to the 2.19.0 release which approx XXX issues resolved (new features, improvements and bug fixes such as...)</p><ul><li>Returning&#160;<code>null</code>&#160;from&#160;<a shape="rect" href="bean.html">Bean</a> should work similar to how&#160;<code>setBody</code>&#160;and&#160;<code>transform</code>&#160;works when they set a&#160;<code>null</code>&#160;body.</li><li>The Camel Spring Boot starter components 
 now have their auto configuration depends on&#160;<code>org.apache.camel.springboot.CamelAutoConfiguration</code> which makes it easier writing unit tests where you can exclude&#160;<code>org.apache.camel.springboot.CamelAutoConfiguration</code> to turn off Camel Spring Boot auto configuration completely.</li><li>Camel now supports OWASP dependency check maven plugin</li><li>Camel-Nats component now supports TLS</li><li>Camel-Metrics component now supports Gauge type</li></ul><p>Fixed these issues</p><ul><li>Fixed&#160;<a shape="rect" href="hystrix-eip.html">Hystrix EIP</a> to also execute fallback if execution was rejected or short-circuited or other reasons from Hystrix.&#160;</li><li>Fixed adding new routes to running CamelContext and if the new routes would fail to startup, then before these routes would "hang around". Now only succesful started routes are added.</li><li>Adding or removing routes that starts from&#160;<a shape="rect" href="undertow.html">Undertow</a> no longer r
 estart the entire HTTP server</li><li><a shape="rect" href="vm.html">VM</a> endpoint should prepare exchange with the CamelContext from the consumer and not from cached endpoint which can be different</li><li>Fixed a bug when using&#160;<a shape="rect" href="rest-dsl.html">Rest DSL</a> with&#160;<a shape="rect" href="servlet.html">SERVLET</a> could cause a java.io.IOException: Stream closed exception when using <a shape="rect" href="bean.html">Bean</a>&#160;in the route.&#160;</li></ul><h3 id="Camel2.19Release-New">New <a shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration Patterns</a></h3><h3 id="Camel2.19Release-New.1">New <a shape="rect" href="components.html">Components</a></h3><ul><li>camel-bonita -&#160;allow you to communicate with a remote Bonita engine.</li></ul><h3 id="Camel2.19Release-NewDSL">New DSL</h3><h3 id="Camel2.19Release-NewAnnotations">New Annotations</h3><h3 id="Camel2.19Release-New.2">New <a shape="rect" href="data-format.html">Data 
 Format</a></h3><h3 id="Camel2.19Release-New.3">New <a shape="rect" href="languages.html">Languages</a></h3><h3 id="Camel2.19Release-New.4">New <a shape="rect" href="examples.html">Examples</a></h3><h3 id="Camel2.19Release-New.5">New <a shape="rect" href="tutorials.html">Tutorials</a></h3><h2 id="Camel2.19Release-APIbreaking">API breaking</h2><h2 id="Camel2.19Release-KnownIssues">Known Issues</h2><h2 id="Camel2.19Release-Importantchangestoconsiderwhenupgrading">Important changes to consider when upgrading</h2><ul><li>Camel now uses Karaf 4.x API and therefore not possible to run on older Karaf versions</li><li>camel-spring-boot now don't include prototype scoped beans when auto scanning for RouteBuilder instances, which is how camel-spring works. You can turn this back using the&#160;includeNonSingletons option.</li></ul><h2 id="Camel2.19Release-GettingtheDistributions">Getting the Distributions</h2><h3 id="Camel2.19Release-BinaryDistributions">Binary Distributions</h3><div class="ta
 ble-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Download Link</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>PGP Signature file of download</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Windows Distribution</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.apache.org/dyn/closer.cgi/camel/apache-camel/x.y.x/apache-camel-x.y.x.zip">apache-camel-x.y.x.zip</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.apache.org/dist/camel/apache-camel/x.y.x/apache-camel-x.y.x.zip.asc">apache-camel-x.y.x.zip.asc</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Unix/Linux/Cygwin Distribution</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-li
 nk" href="http://www.apache.org/dyn/closer.cgi/camel/apache-camel/x.y.x/apache-camel-x.y.x.tar.gz">apache-camel-x.y.x.tar.gz</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.apache.org/dist/camel/apache-camel/x.y.x/apache-camel-x.y.x.tar.gz.asc">apache-camel-x.y.x.tar.gz.asc</a></p></td></tr></tbody></table></div><div class="confluence-information-macro confluence-information-macro-information"><p class="title">The above URLs use redirection</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>The above URLs use the Apache Mirror system to redirect you to a suitable mirror for your download. Some users have experienced issues with some versions of browsers (e.g. some Safari browsers). If the download doesn't seem to work for you from the above URL then try using <a shape="rect" class="external-link" href="http://www.mo
 zilla.com/en-US/firefox/" rel="nofollow">FireFox</a></p></div></div><h3 id="Camel2.19Release-SourceDistributions">Source Distributions</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Download Link</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>PGP Signature file of download</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Source (zip)</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.apache.org/dyn/closer.cgi/camel/apache-camel/x.y.x/apache-camel-x.y.x-src.zip">apache-camel-x.y.x-src.zip</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.apache.org/dist/camel/apache-camel/x.y.x/apache-camel-x.y.x-src.zip.asc">apache-camel-x.y.x-src.zip.asc</a></p></td></tr></tbody></table></di
 v><h3 id="Camel2.19Release-GettingtheBinariesusingMaven2">Getting the Binaries using Maven 2</h3><p>To use this release in your maven project, the proper dependency configuration that you should use in your <a shape="rect" class="external-link" href="http://maven.apache.org/guides/introduction/introduction-to-the-pom.html">Maven POM</a> is:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<div class="wiki-content maincontent"><h1 id="Camel2.19Release-Camel2.19.0Release(currentlyinprogress)">Camel 2.19.0 Release (currently in progress)</h1><div style="padding-right:20px;float:left;margin-left:-20px;"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://camel.apache.org/images/camel-box-small.png" data-image-src="http://camel.apache.org/images/camel-box-small.png"></span></div><div style="min-height:200px">&#160;</div><h2 id="Camel2.19Release-NewandNoteworthy">New and Noteworthy</h2><p>Welcome to the 2.19.0 release which approx XXX issues resolved (new features, improvements and bug fixes such as...)</p><ul><li>Returning&#160;<code>null</code>&#160;from&#160;<a shape="rect" href="bean.html">Bean</a> should work similar to how&#160;<code>setBody</code>&#160;and&#160;<code>transform</code>&#160;works when they set a&#160;<code>null</code>&#160;body.</li><li>The Camel Spring Boot starter components 
 now have their auto configuration depends on&#160;<code>org.apache.camel.springboot.CamelAutoConfiguration</code> which makes it easier writing unit tests where you can exclude&#160;<code>org.apache.camel.springboot.CamelAutoConfiguration</code> to turn off Camel Spring Boot auto configuration completely.</li><li>Camel now supports OWASP dependency check maven plugin</li><li>Camel-Nats component now supports TLS</li><li>Camel-Metrics component now supports Gauge type</li></ul><p>Fixed these issues</p><ul><li>Fixed&#160;<a shape="rect" href="hystrix-eip.html">Hystrix EIP</a> to also execute fallback if execution was rejected or short-circuited or other reasons from Hystrix.&#160;</li><li>Fixed adding new routes to running CamelContext and if the new routes would fail to startup, then before these routes would "hang around". Now only succesful started routes are added.</li><li>Adding or removing routes that starts from&#160;<a shape="rect" href="undertow.html">Undertow</a> no longer r
 estart the entire HTTP server</li><li><a shape="rect" href="vm.html">VM</a> endpoint should prepare exchange with the CamelContext from the consumer and not from cached endpoint which can be different</li><li>Fixed a bug when using&#160;<a shape="rect" href="rest-dsl.html">Rest DSL</a> with&#160;<a shape="rect" href="servlet.html">SERVLET</a> could cause a java.io.IOException: Stream closed exception when using <a shape="rect" href="bean.html">Bean</a>&#160;in the route.&#160;</li><li>Fixed an issue when using&#160;<code>pipeline</code> in Java DSL not setting up the EIP correctly which could lead to runtime route not as intended.</li></ul><h3 id="Camel2.19Release-New">New <a shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration Patterns</a></h3><h3 id="Camel2.19Release-New.1">New <a shape="rect" href="components.html">Components</a></h3><ul><li>camel-bonita -&#160;allow you to communicate with a remote Bonita engine.</li></ul><h3 id="Camel2.19Release-NewDS
 L">New DSL</h3><h3 id="Camel2.19Release-NewAnnotations">New Annotations</h3><h3 id="Camel2.19Release-New.2">New <a shape="rect" href="data-format.html">Data Format</a></h3><h3 id="Camel2.19Release-New.3">New <a shape="rect" href="languages.html">Languages</a></h3><h3 id="Camel2.19Release-New.4">New <a shape="rect" href="examples.html">Examples</a></h3><h3 id="Camel2.19Release-New.5">New <a shape="rect" href="tutorials.html">Tutorials</a></h3><h2 id="Camel2.19Release-APIbreaking">API breaking</h2><h2 id="Camel2.19Release-KnownIssues">Known Issues</h2><h2 id="Camel2.19Release-Importantchangestoconsiderwhenupgrading">Important changes to consider when upgrading</h2><ul><li>Camel now uses Karaf 4.x API and therefore not possible to run on older Karaf versions</li><li>camel-spring-boot now don't include prototype scoped beans when auto scanning for RouteBuilder instances, which is how camel-spring works. You can turn this back using the&#160;includeNonSingletons option.</li></ul><h2 id="
 Camel2.19Release-GettingtheDistributions">Getting the Distributions</h2><h3 id="Camel2.19Release-BinaryDistributions">Binary Distributions</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Download Link</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>PGP Signature file of download</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Windows Distribution</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.apache.org/dyn/closer.cgi/camel/apache-camel/x.y.x/apache-camel-x.y.x.zip">apache-camel-x.y.x.zip</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.apache.org/dist/camel/apache-camel/x.y.x/apache-camel-x.y.x.zip.asc">apache-camel-x.y.x.zip.asc</a></p></td></tr><tr><td colspan="1" rows
 pan="1" class="confluenceTd"><p>Unix/Linux/Cygwin Distribution</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.apache.org/dyn/closer.cgi/camel/apache-camel/x.y.x/apache-camel-x.y.x.tar.gz">apache-camel-x.y.x.tar.gz</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.apache.org/dist/camel/apache-camel/x.y.x/apache-camel-x.y.x.tar.gz.asc">apache-camel-x.y.x.tar.gz.asc</a></p></td></tr></tbody></table></div><div class="confluence-information-macro confluence-information-macro-information"><p class="title">The above URLs use redirection</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>The above URLs use the Apache Mirror system to redirect you to a suitable mirror for your download. Some users have experienced issues with some versions of browsers (e.g. so
 me Safari browsers). If the download doesn't seem to work for you from the above URL then try using <a shape="rect" class="external-link" href="http://www.mozilla.com/en-US/firefox/" rel="nofollow">FireFox</a></p></div></div><h3 id="Camel2.19Release-SourceDistributions">Source Distributions</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Download Link</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>PGP Signature file of download</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Source (zip)</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://www.apache.org/dyn/closer.cgi/camel/apache-camel/x.y.x/apache-camel-x.y.x-src.zip">apache-camel-x.y.x-src.zip</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" h
 ref="http://www.apache.org/dist/camel/apache-camel/x.y.x/apache-camel-x.y.x-src.zip.asc">apache-camel-x.y.x-src.zip.asc</a></p></td></tr></tbody></table></div><h3 id="Camel2.19Release-GettingtheBinariesusingMaven2">Getting the Binaries using Maven 2</h3><p>To use this release in your maven project, the proper dependency configuration that you should use in your <a shape="rect" class="external-link" href="http://maven.apache.org/guides/introduction/introduction-to-the-pom.html">Maven POM</a> is:</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"><![CDATA[&lt;dependency&gt;
   &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
   &lt;artifactId&gt;camel-core&lt;/artifactId&gt;

Modified: websites/production/camel/content/properties.html
==============================================================================
--- websites/production/camel/content/properties.html (original)
+++ websites/production/camel/content/properties.html Fri Nov  4 16:21:17 2016
@@ -94,7 +94,11 @@
 </div></div><div class="confluence-information-macro confluence-information-macro-tip"><p class="title">Resolving property from Java code</p><span class="aui-icon aui-icon-small aui-iconfont-approve confluence-information-macro-icon"></span><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="Properties-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 l
 imitation 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 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="Properties-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 pa
 rameters 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 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="Properties-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.co
 mponent.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="Properties-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 wi
 th comma 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"><![CDATA[pc.setLocation(&quot;com/mycompany/myprop.properties,com/mycompany/other.properties&quot;);
 ]]></script>
-</div></div><h4 id="Properties-UsingSystemandEnvironmentVariablesinLocations">Using System and Environment Variables in Locations</h4><p><strong>Available as of Camel 2.7</strong></p><p>The location now supports using placeholders for JVM system properties and OS environments variables.</p><p>Example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</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></div><div><h4 id="Properties-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"><![CDATA[pc.setLocations(
+    &quot;com/mycompany/override.properties;optional=true&quot;
+    &quot;com/mycompany/defaults.properties&quot;);]]></script>
+</div></div><p>&#160;</p></div><h4 id="Properties-UsingSystemandEnvironmentVariablesinLocations">Using System and Environment Variables in Locations</h4><p><strong>Available as of Camel 2.7</strong></p><p>The location now supports using placeholders for JVM system properties and OS environments variables.</p><p>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"><![CDATA[location=file:${karaf.home}/etc/foo.properties
 ]]></script>
 </div></div><p>In the location above we defined a location using the file scheme using the JVM system property with key <strong><code>karaf.home</code></strong>.</p><p>To use an OS environment variable instead you would have to prefix with <strong><code>env</code></strong>:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
@@ -123,7 +127,7 @@ context.addRoutes(new RouteBuilder() {
 pc.setLocation(&quot;classpath:com/mycompany/myprop.properties&quot;);
 context.addComponent(&quot;properties&quot;, pc);
 ]]></script>
-</div></div><h3 id="Properties-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">
+</div></div><h3 id="Properties-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 class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;bean id=&quot;properties&quot; class=&quot;org.apache.camel.component.properties.PropertiesComponent&quot;&gt;
     &lt;property name=&quot;location&quot; value=&quot;classpath:com/mycompany/myprop.properties&quot;/&gt;
 &lt;/bean&gt;
@@ -133,6 +137,23 @@ context.addComponent(&quot;properties&qu
    &lt;propertyPlaceholder id=&quot;properties&quot; location=&quot;com/mycompany/myprop.properties&quot;/&gt;
 &lt;/camelContext&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 class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;camelContext ...&gt;
+  &lt;propertyPlaceholder id=&quot;myPropertyPlaceholder&quot;&gt;
+    &lt;propertiesLocation
+      resolver = &quot;classpath&quot;
+      path     = &quot;com/my/company/something/my-properties-1.properties&quot;
+      optional = &quot;false&quot;/&gt;
+    &lt;propertiesLocation
+      resolver = &quot;classpath&quot;
+      path     = &quot;com/my/company/something/my-properties-2.properties&quot;
+      optional = &quot;false&quot;/&gt;
+    &lt;propertiesLocation
+      resolver = &quot;file&quot;
+      path     = &quot;${karaf.home}/etc/my-override.properties&quot;
+      optional = &quot;true&quot;/&gt;
+   &lt;/propertyPlaceholder&gt;
+&lt;/camelContext&gt;]]></script>
 </div></div><div class="confluence-information-macro confluence-information-macro-tip"><p class="title">Specifying the cache option in XML</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>: Camel supports specifying a value for the&#160;<strong><code>cache</code></strong> option both inside the Spring as well as the Blueprint XML.</p></div></div><h3 id="Properties-UsingaPropertiesfromthe">Using a Properties from the <a shape="rect" href="registry.html">Registry</a></h3><p><strong>Available as of Camel 2.4</strong><br clear="none"> For example in OSGi you may want to expose a service which returns the properties as a <strong><code>java.util.Properties</code></strong> object.</p><p>Then you could setup the <a shape="rect" href="properties.html">Properties</a> component as follows:</p><div class="code panel pdl" style="border-width: 1px;"><div class="c
 odeContent panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;propertyPlaceholder id=&quot;properties&quot; location=&quot;ref:myProperties&quot;/&gt;
 ]]></script>

Modified: websites/production/camel/content/using-propertyplaceholder.html
==============================================================================
--- websites/production/camel/content/using-propertyplaceholder.html (original)
+++ websites/production/camel/content/using-propertyplaceholder.html Fri Nov  4 16:21:17 2016
@@ -89,7 +89,11 @@
 <div class="wiki-content maincontent"><h2 id="UsingPropertyPlaceholder-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 class="confluence-information-macro confluence-information-macro-tip"><p class="title">Bridging Spring and Camel property placeholders</p><span class="aui-i
 con 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="UsingPropertyPlaceholder-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 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="UsingPropertyPlaceholder-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="UsingPropertyPlaceholder-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 class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[pc.setLocation(&quot;com/mycompany/myprop.properties,com/mycompany/other.properties&quot;);
 ]]></script>
-</div></div><h4 id="UsingPropertyPlaceholder-UsingSystemandEnvironmentVariablesinLocations">Using System and Environment Variables in Locations</h4><p><strong>Available as of Camel 2.7</strong></p><p>The location now supports using placeholders for JVM system properties and OS environments variables.</p><p>Example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</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></div><div><h4 id="UsingPropertyPlaceholder-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"><![CDATA[pc.setLocations(
+    &quot;com/mycompany/override.properties;optional=true&quot;
+    &quot;com/mycompany/defaults.properties&quot;);]]></script>
+</div></div><p>&#160;</p></div><h4 id="UsingPropertyPlaceholder-UsingSystemandEnvironmentVariablesinLocations">Using System and Environment Variables in Locations</h4><p><strong>Available as of Camel 2.7</strong></p><p>The location now supports using placeholders for JVM system properties and OS environments variables.</p><p>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"><![CDATA[location=file:${karaf.home}/etc/foo.properties
 ]]></script>
 </div></div><p>In the location above we defined a location using the file scheme using the JVM system property with key <strong><code>karaf.home</code></strong>.</p><p>To use an OS environment variable instead you would have to prefix with <strong><code>env</code></strong>:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
@@ -118,7 +122,7 @@ context.addRoutes(new RouteBuilder() {
 pc.setLocation(&quot;classpath:com/mycompany/myprop.properties&quot;);
 context.addComponent(&quot;properties&quot;, pc);
 ]]></script>
-</div></div><h3 id="UsingPropertyPlaceholder-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">
+</div></div><h3 id="UsingPropertyPlaceholder-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 class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;bean id=&quot;properties&quot; class=&quot;org.apache.camel.component.properties.PropertiesComponent&quot;&gt;
     &lt;property name=&quot;location&quot; value=&quot;classpath:com/mycompany/myprop.properties&quot;/&gt;
 &lt;/bean&gt;
@@ -128,6 +132,23 @@ context.addComponent(&quot;properties&qu
    &lt;propertyPlaceholder id=&quot;properties&quot; location=&quot;com/mycompany/myprop.properties&quot;/&gt;
 &lt;/camelContext&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 class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;camelContext ...&gt;
+  &lt;propertyPlaceholder id=&quot;myPropertyPlaceholder&quot;&gt;
+    &lt;propertiesLocation
+      resolver = &quot;classpath&quot;
+      path     = &quot;com/my/company/something/my-properties-1.properties&quot;
+      optional = &quot;false&quot;/&gt;
+    &lt;propertiesLocation
+      resolver = &quot;classpath&quot;
+      path     = &quot;com/my/company/something/my-properties-2.properties&quot;
+      optional = &quot;false&quot;/&gt;
+    &lt;propertiesLocation
+      resolver = &quot;file&quot;
+      path     = &quot;${karaf.home}/etc/my-override.properties&quot;
+      optional = &quot;true&quot;/&gt;
+   &lt;/propertyPlaceholder&gt;
+&lt;/camelContext&gt;]]></script>
 </div></div><div class="confluence-information-macro confluence-information-macro-tip"><p class="title">Specifying the cache option in XML</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>: Camel supports specifying a value for the&#160;<strong><code>cache</code></strong> option both inside the Spring as well as the Blueprint XML.</p></div></div><h3 id="UsingPropertyPlaceholder-UsingaPropertiesfromthe">Using a Properties from the <a shape="rect" href="registry.html">Registry</a></h3><p><strong>Available as of Camel 2.4</strong><br clear="none"> For example in OSGi you may want to expose a service which returns the properties as a <strong><code>java.util.Properties</code></strong> object.</p><p>Then you could setup the <a shape="rect" href="properties.html">Properties</a> component as follows:</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"><![CDATA[&lt;propertyPlaceholder id=&quot;properties&quot; location=&quot;ref:myProperties&quot;/&gt;
 ]]></script>