Author: buildbot Date: Fri Feb 17 20:20:09 2017 New Revision: 1006941 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 Fri Feb 17 20:20:09 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.rbtoc1485983924092 {padding: 0px;} div.rbtoc1485983924092 ul {list-style: disc;margin-left: 0px;} div.rbtoc1485983924092 li {margin-left: 0px;padding-left: 0px;} /**/</style> - </p><div class="toc-macro rbtoc1485983924092"> +</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.rbtoc1487362681799 {padding: 0px;} div.rbtoc1487362681799 ul {list-style: disc;margin-left: 0px;} div.rbtoc1487362681799 li {margin-left: 0px;padding-left: 0px;} /**/</style> + </p><div class="toc-macro rbtoc1487362681799"> <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> @@ -4568,13 +4568,23 @@ cometds://localhost:8443/service/mychann <div class="codeContent panelContent pdl"> <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter">RouteBuilder builder = new RouteBuilder() { public void configure() { from(file://inputdir/?delete=true) .to(&quot;lpr://remotehost/sales/salesprinter&quot; + &quot;?copies=2&amp;sides=one-sided&quot; + &quot;&amp;mimeType=JPEG&quot; + &quot;&amp;mediaSize=JAPANESE_POSTCARD&quot; + &quot;&amp;flavor=DocFlavor.INPUT_STREAM&quot;) }}; </script> </div> -</div><h2 id="BookComponentAppendix-PropertiesComponent">Properties Component</h2><p><strong>Available as of Camel 2.3</strong></p><h3 id="BookComponentAppendix-URIformat.51">URI format</h3><div class="code panel pdl" style="border-width: 1px;"> +</div><h2 id="BookComponentAppendix-PropertiesComponent">Properties Component</h2><p><strong>Available from Camel 2.3</strong></p><h3 id="BookComponentAppendix-URIformat.51">URI format</h3><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:key[?options] </script> </div> </div><p>Where <strong><code>key</code></strong> is the key for the property to be looked up.</p><h3 id="BookComponentAppendix-Options.40">Options</h3><div class="confluenceTableSmall"> <div class="table-wrap"> - <table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>cache</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether or not to cache loaded properties.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>encoding</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.14.3/2.15.1:</st rong> To use a specific charset to load the properties, such as UTF-8. By default <code>ISO-8859-1</code> (<code>latin1</code>) is used.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>fallbackToUnaugmentedProperty</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9</strong> If <strong><code>true</code></strong>, first attempt resolution of property name augmented with <strong><code>propertyPrefix</code></strong> and <strong><code>propertySuffix</code></strong> before falling back the plain property name specified.</p><p>If <strong><code>false</code></strong>, only the augmented property name is searched.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">defaultFallbackEnabled</td><td colspan="1" rowspan="1" class="confluenceTd">boolean</td><td co lspan="1" rowspan="1" class="confluenceTd">true</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.19</strong> If false the component does not attempt to find a default for the key by looking after the colon separator.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>ignoreMissingLocation</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10:</strong> Whether to silently ignore if a location cannot be located, such as a properties file not found.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>locations</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>A li st of locations to load properties. You can use comma to separate multiple locations. This option will override any default locations and <strong>only</strong> use the locations from this option.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>prefixToken</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>{{</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9</strong> The token to indicate the beginning of a property token.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>propertyPrefix</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9</strong> Optional prefix prepended to property names before resolution.</p ></td></tr><tr><td colspan="1" rowspan="1" >class="confluenceTd"><p><code>propertySuffix</code></p></td><td colspan="1" >rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9</strong> >Optional suffix appended to property names before >resolution.</p></td></tr><tr><td colspan="1" rowspan="1" >class="confluenceTd"><p><code>suffixToken</code></p></td><td colspan="1" >rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p><code>}}<br >clear="none"></code></p></td><td colspan="1" rowspan="1" >class="confluenceTd"><p><strong>Camel 2.9</strong> The token to indicate the >end of a property token.</p></td></tr><tr><td colspan="1" rowspan="1" >class="confluenceTd"><p><code>systemPropertiesMode</code></p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p><code>int</code></p></td><t d colspan="1" rowspan="1" class="confluenceTd"><p><code>2</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.16</strong> The mode to use for whether to resolve and use system properties:</p><p><strong><code>0</code></strong> = never - JVM system properties are never used.<br clear="none"><strong><code>1</code></strong> = fallback - JVM system properties are only used as fallback if no regular property with the key exists.<br clear="none"><strong><code>2</code></strong> = override - JVM system properties are used if exists, otherwise the regular property will be used.</p><p><strong>Note</strong>: when bridging to Spring's property placeholder using <strong><code>org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer</code></strong> the configuration on <strong><code>BridgePropertyPlaceholderConfigurer</code></strong> will take precedence over the configuration on the <strong><code>PropertiesComponent</code></strong>. </p></ td></tr></tbody></table> + <table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Option</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>cache</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether or not to cache loaded properties.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>encoding</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.14.3/2.15.1:</ strong> The charset to use when loading properties, such as <strong><code>UTF-8</code></strong>.</p><p>The default charset is: <strong><code>ISO-8859-1</code></strong> (<strong><code>latin1</code></strong>).</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>fallbackToUnaugmentedProperty</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9</strong> If <strong><code>true</code></strong>, first attempt resolution of property name augmented with <strong><code>propertyPrefix</code></strong> and <strong><code>propertySuffix</code></strong> before falling back the plain property name specified.</p><p>If <strong><code>false</code></strong>, only the augmented property name is searched.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>defaultFallbackEnab led</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.19</strong>: If <strong><code>false</code></strong> the component will not attempt to find a default for the key by looking after the colon separator.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>ignoreMissingLocation</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10:</strong> Whether to silently ignore if a location cannot be located, such as a properties file not found.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>locations</code></p></td><td colspan="1" rowspan="1" class="confluence Td"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>A comma separated list of one or more locations of property files to be loaded. Property resolution will use the given property files exclusively. Any default location(s) are ignored.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>prefixToken</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>{{</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9</strong> This token is used to mark the start of a property placeholder definition.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>propertyPrefix</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p ><code>null</code></p></td><td colspan="1" rowspan="1" >class="confluenceTd"><p><strong>Camel 2.9</strong> An optional prefix that's ><em>prepended</em> to each property name prior to >resolution.</p></td></tr><tr><td colspan="1" rowspan="1" >class="confluenceTd"><p><code>propertySuffix</code></p></td><td colspan="1" >rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9</strong> An >optional suffix that's <em>appended</em> to each property name prior to >resolution.</p></td></tr><tr><td colspan="1" rowspan="1" >class="confluenceTd"><p><code>suffixToken</code></p></td><td colspan="1" >rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p><code>}}<br >clear="none"></code></p></td><td colspan="1" rowspan="1" >class="confluenceTd"><p><strong>Camel 2.9</strong> This token is used t o mark the end of a property placeholder definition.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>systemPropertiesMode</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>int</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>2</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.16</strong> The mode to use for whether to resolve and use system properties:</p><p><strong><code>0</code></strong> = never - JVM system properties are never used.<br clear="none"><strong><code>1</code></strong> = fallback - JVM system properties are only used as fallback if no regular property with the key exists.<br clear="none"><strong><code>2</code></strong> = override - JVM system properties are used if exists, otherwise the regular property will be used.</p> + <div class="confluence-information-macro confluence-information-macro-warning"> + <p class="title">Bridging Spring and Camel Property Placeholders</p> + <span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"></span> + <div class="confluence-information-macro-body"> + When bridging to Spring's property placeholder using + <strong><code>org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer</code></strong> the configuration on + <strong><code>BridgePropertyPlaceholderConfigurer</code></strong> will take precedence over the configuration on the + <strong><code>PropertiesComponent</code></strong>.  + </div> + </div></td></tr></tbody></table> </div> </div><div class="confluence-information-macro confluence-information-macro-tip"> <p class="title">Resolving property from Java code</p> @@ -4584,7 +4594,7 @@ cometds://localhost:8443/service/mychann </div> </div><p></p><h2 id="BookComponentAppendix-UsingPropertyPlaceholder">Using <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 <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><property-placeholder></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> + <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> @@ -4615,6 +4625,7 @@ cometds://localhost:8443/service/mychann <p>Example:</p> </div> <div> + <p> </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(&quot;com/mycompany/override.properties;optional=true,com/mycompany/defaults.properties&quot;);</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 Fri Feb 17 20:20:09 2017 @@ -3933,11 +3933,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> </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.rbtoc1487326735988 {padding: 0px;} -div.rbtoc1487326735988 ul {list-style: disc;margin-left: 0px;} -div.rbtoc1487326735988 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1487362709500 {padding: 0px;} +div.rbtoc1487362709500 ul {list-style: disc;margin-left: 0px;} +div.rbtoc1487362709500 li {margin-left: 0px;padding-left: 0px;} -/*]]>*/</style></p><div class="toc-macro rbtoc1487326735988"> +/*]]>*/</style></p><div class="toc-macro rbtoc1487362709500"> <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> @@ -6052,11 +6052,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.rbtoc1487326736179 {padding: 0px;} -div.rbtoc1487326736179 ul {list-style: disc;margin-left: 0px;} -div.rbtoc1487326736179 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1487362710141 {padding: 0px;} +div.rbtoc1487362710141 ul {list-style: disc;margin-left: 0px;} +div.rbtoc1487362710141 li {margin-left: 0px;padding-left: 0px;} -/*]]>*/</style><div class="toc-macro rbtoc1487326736179"> +/*]]>*/</style><div class="toc-macro rbtoc1487362710141"> <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> @@ -14244,8 +14244,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.rbtoc1487326758514 {padding: 0px;} div.rbtoc1487326758514 ul {list-style: disc;margin-left: 0px;} div.rbtoc1487326758514 li {margin-left: 0px;padding-left: 0px;} /**/</style> - </p><div class="toc-macro rbtoc1487326758514"> +</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.rbtoc1487362735908 {padding: 0px;} div.rbtoc1487362735908 ul {list-style: disc;margin-left: 0px;} div.rbtoc1487362735908 li {margin-left: 0px;padding-left: 0px;} /**/</style> + </p><div class="toc-macro rbtoc1487362735908"> <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> @@ -18191,13 +18191,23 @@ cometds://localhost:8443/service/mychann <div class="codeContent panelContent pdl"> <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter">RouteBuilder builder = new RouteBuilder() { public void configure() { from(file://inputdir/?delete=true) .to(&quot;lpr://remotehost/sales/salesprinter&quot; + &quot;?copies=2&amp;sides=one-sided&quot; + &quot;&amp;mimeType=JPEG&quot; + &quot;&amp;mediaSize=JAPANESE_POSTCARD&quot; + &quot;&amp;flavor=DocFlavor.INPUT_STREAM&quot;) }}; </script> </div> -</div><h2 id="BookInOnePage-PropertiesComponent">Properties Component</h2><p><strong>Available as of Camel 2.3</strong></p><h3 id="BookInOnePage-URIformat.52">URI format</h3><div class="code panel pdl" style="border-width: 1px;"> +</div><h2 id="BookInOnePage-PropertiesComponent">Properties Component</h2><p><strong>Available from Camel 2.3</strong></p><h3 id="BookInOnePage-URIformat.52">URI format</h3><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:key[?options] </script> </div> </div><p>Where <strong><code>key</code></strong> is the key for the property to be looked up.</p><h3 id="BookInOnePage-Options.61">Options</h3><div class="confluenceTableSmall"> <div class="table-wrap"> - <table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>cache</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether or not to cache loaded properties.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>encoding</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.14.3/2.15.1:</st rong> To use a specific charset to load the properties, such as UTF-8. By default <code>ISO-8859-1</code> (<code>latin1</code>) is used.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>fallbackToUnaugmentedProperty</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9</strong> If <strong><code>true</code></strong>, first attempt resolution of property name augmented with <strong><code>propertyPrefix</code></strong> and <strong><code>propertySuffix</code></strong> before falling back the plain property name specified.</p><p>If <strong><code>false</code></strong>, only the augmented property name is searched.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">defaultFallbackEnabled</td><td colspan="1" rowspan="1" class="confluenceTd">boolean</td><td co lspan="1" rowspan="1" class="confluenceTd">true</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.19</strong> If false the component does not attempt to find a default for the key by looking after the colon separator.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>ignoreMissingLocation</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10:</strong> Whether to silently ignore if a location cannot be located, such as a properties file not found.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>locations</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>A li st of locations to load properties. You can use comma to separate multiple locations. This option will override any default locations and <strong>only</strong> use the locations from this option.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>prefixToken</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>{{</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9</strong> The token to indicate the beginning of a property token.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>propertyPrefix</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9</strong> Optional prefix prepended to property names before resolution.</p ></td></tr><tr><td colspan="1" rowspan="1" >class="confluenceTd"><p><code>propertySuffix</code></p></td><td colspan="1" >rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9</strong> >Optional suffix appended to property names before >resolution.</p></td></tr><tr><td colspan="1" rowspan="1" >class="confluenceTd"><p><code>suffixToken</code></p></td><td colspan="1" >rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p><code>}}<br >clear="none"></code></p></td><td colspan="1" rowspan="1" >class="confluenceTd"><p><strong>Camel 2.9</strong> The token to indicate the >end of a property token.</p></td></tr><tr><td colspan="1" rowspan="1" >class="confluenceTd"><p><code>systemPropertiesMode</code></p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p><code>int</code></p></td><t d colspan="1" rowspan="1" class="confluenceTd"><p><code>2</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.16</strong> The mode to use for whether to resolve and use system properties:</p><p><strong><code>0</code></strong> = never - JVM system properties are never used.<br clear="none"><strong><code>1</code></strong> = fallback - JVM system properties are only used as fallback if no regular property with the key exists.<br clear="none"><strong><code>2</code></strong> = override - JVM system properties are used if exists, otherwise the regular property will be used.</p><p><strong>Note</strong>: when bridging to Spring's property placeholder using <strong><code>org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer</code></strong> the configuration on <strong><code>BridgePropertyPlaceholderConfigurer</code></strong> will take precedence over the configuration on the <strong><code>PropertiesComponent</code></strong>. </p></ td></tr></tbody></table> + <table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Option</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>cache</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether or not to cache loaded properties.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>encoding</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.14.3/2.15.1:</ strong> The charset to use when loading properties, such as <strong><code>UTF-8</code></strong>.</p><p>The default charset is: <strong><code>ISO-8859-1</code></strong> (<strong><code>latin1</code></strong>).</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>fallbackToUnaugmentedProperty</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9</strong> If <strong><code>true</code></strong>, first attempt resolution of property name augmented with <strong><code>propertyPrefix</code></strong> and <strong><code>propertySuffix</code></strong> before falling back the plain property name specified.</p><p>If <strong><code>false</code></strong>, only the augmented property name is searched.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>defaultFallbackEnab led</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.19</strong>: If <strong><code>false</code></strong> the component will not attempt to find a default for the key by looking after the colon separator.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>ignoreMissingLocation</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10:</strong> Whether to silently ignore if a location cannot be located, such as a properties file not found.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>locations</code></p></td><td colspan="1" rowspan="1" class="confluence Td"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>A comma separated list of one or more locations of property files to be loaded. Property resolution will use the given property files exclusively. Any default location(s) are ignored.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>prefixToken</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>{{</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9</strong> This token is used to mark the start of a property placeholder definition.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>propertyPrefix</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p ><code>null</code></p></td><td colspan="1" rowspan="1" >class="confluenceTd"><p><strong>Camel 2.9</strong> An optional prefix that's ><em>prepended</em> to each property name prior to >resolution.</p></td></tr><tr><td colspan="1" rowspan="1" >class="confluenceTd"><p><code>propertySuffix</code></p></td><td colspan="1" >rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9</strong> An >optional suffix that's <em>appended</em> to each property name prior to >resolution.</p></td></tr><tr><td colspan="1" rowspan="1" >class="confluenceTd"><p><code>suffixToken</code></p></td><td colspan="1" >rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p><code>}}<br >clear="none"></code></p></td><td colspan="1" rowspan="1" >class="confluenceTd"><p><strong>Camel 2.9</strong> This token is used t o mark the end of a property placeholder definition.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>systemPropertiesMode</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>int</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>2</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.16</strong> The mode to use for whether to resolve and use system properties:</p><p><strong><code>0</code></strong> = never - JVM system properties are never used.<br clear="none"><strong><code>1</code></strong> = fallback - JVM system properties are only used as fallback if no regular property with the key exists.<br clear="none"><strong><code>2</code></strong> = override - JVM system properties are used if exists, otherwise the regular property will be used.</p> + <div class="confluence-information-macro confluence-information-macro-warning"> + <p class="title">Bridging Spring and Camel Property Placeholders</p> + <span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"></span> + <div class="confluence-information-macro-body"> + When bridging to Spring's property placeholder using + <strong><code>org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer</code></strong> the configuration on + <strong><code>BridgePropertyPlaceholderConfigurer</code></strong> will take precedence over the configuration on the + <strong><code>PropertiesComponent</code></strong>.  + </div> + </div></td></tr></tbody></table> </div> </div><div class="confluence-information-macro confluence-information-macro-tip"> <p class="title">Resolving property from Java code</p> @@ -18207,7 +18217,7 @@ cometds://localhost:8443/service/mychann </div> </div><p></p><h2 id="BookInOnePage-UsingPropertyPlaceholder">Using <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 <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><property-placeholder></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> + <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> @@ -18238,6 +18248,7 @@ cometds://localhost:8443/service/mychann <p>Example:</p> </div> <div> + <p> </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(&quot;com/mycompany/override.properties;optional=true,com/mycompany/defaults.properties&quot;);</script> Modified: websites/production/camel/content/cache/main.pageCache ============================================================================== Binary files - no diff available. Modified: websites/production/camel/content/properties.html ============================================================================== --- websites/production/camel/content/properties.html (original) +++ websites/production/camel/content/properties.html Fri Feb 17 20:20:09 2017 @@ -86,17 +86,27 @@ <tbody> <tr> <td valign="top" width="100%"> -<div class="wiki-content maincontent"><h2 id="Properties-PropertiesComponent">Properties Component</h2><p><strong>Available as of Camel 2.3</strong></p><h3 id="Properties-URIformat">URI format</h3><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<div class="wiki-content maincontent"><h2 id="Properties-PropertiesComponent">Properties Component</h2><p><strong>Available from Camel 2.3</strong></p><h3 id="Properties-URIformat">URI format</h3><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[properties:key[?options] ]]></script> </div></div><p>Where <strong><code>key</code></strong> is the key for the property to be looked up.</p><h3 id="Properties-Options">Options</h3><div class="confluenceTableSmall"><div class="table-wrap"> - <table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>cache</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether or not to cache loaded properties.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>encoding</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.14.3/2.15.1:</str ong> To use a specific charset to load the properties, such as UTF-8. By default <code>ISO-8859-1</code> (<code>latin1</code>) is used.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>fallbackToUnaugmentedProperty</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9</strong> If <strong><code>true</code></strong>, first attempt resolution of property name augmented with <strong><code>propertyPrefix</code></strong> and <strong><code>propertySuffix</code></strong> before falling back the plain property name specified.</p><p>If <strong><code>false</code></strong>, only the augmented property name is searched.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">defaultFallbackEnabled</td><td colspan="1" rowspan="1" class="confluenceTd">boolean</td><td col span="1" rowspan="1" class="confluenceTd">true</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.19</strong> If false the component does not attempt to find a default for the key by looking after the colon separator.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>ignoreMissingLocation</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10:</strong> Whether to silently ignore if a location cannot be located, such as a properties file not found.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>locations</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>A lis t of locations to load properties. You can use comma to separate multiple locations. This option will override any default locations and <strong>only</strong> use the locations from this option.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>prefixToken</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>{{</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9</strong> The token to indicate the beginning of a property token.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>propertyPrefix</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9</strong> Optional prefix prepended to property names before resolution.</p> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>propertySuffix</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9</strong> Optional suffix appended to property names before resolution.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>suffixToken</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>}}<br clear="none"></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9</strong> The token to indicate the end of a property token.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>systemPropertiesMode</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>int</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>2</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.16</strong> The mode to use for whether to resolve and use system properties:</p><p><strong><code>0</code></strong> = never - JVM system properties are never used.<br clear="none"><strong><code>1</code></strong> = fallback - JVM system properties are only used as fallback if no regular property with the key exists.<br clear="none"><strong><code>2</code></strong> = override - JVM system properties are used if exists, otherwise the regular property will be used.</p><p><strong>Note</strong>: when bridging to Spring's property placeholder using <strong><code>org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer</code></strong> the configuration on <strong><code>BridgePropertyPlaceholderConfigurer</code></strong> will take precedence over the configuration on the <strong><code>PropertiesComponent</code></strong>. </p></t d></tr></tbody></table> -</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 <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 <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><property-placeholder></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 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 <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-Format">Format</h3><p>The value of a Camel property can be obtained by specifying its key name within a property placeholder, using 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 "> + <table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Option</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>cache</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether or not to cache loaded properties.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>encoding</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.14.3/2.15.1:</s trong> The charset to use when loading properties, such as <strong><code>UTF-8</code></strong>.</p><p>The default charset is: <strong><code>ISO-8859-1</code></strong> (<strong><code>latin1</code></strong>).</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>fallbackToUnaugmentedProperty</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9</strong> If <strong><code>true</code></strong>, first attempt resolution of property name augmented with <strong><code>propertyPrefix</code></strong> and <strong><code>propertySuffix</code></strong> before falling back the plain property name specified.</p><p>If <strong><code>false</code></strong>, only the augmented property name is searched.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>defaultFallbackEnabl ed</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.19</strong>: If <strong><code>false</code></strong> the component will not attempt to find a default for the key by looking after the colon separator.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>ignoreMissingLocation</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10:</strong> Whether to silently ignore if a location cannot be located, such as a properties file not found.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>locations</code></p></td><td colspan="1" rowspan="1" class="confluenceT d"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>A comma separated list of one or more locations of property files to be loaded. Property resolution will use the given property files exclusively. Any default location(s) are ignored.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>prefixToken</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>{{</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9</strong> This token is used to mark the start of a property placeholder definition.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>propertyPrefix</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9</strong> An optional prefix that's <em>prepended</em> to each property name prior to resolution.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>propertySuffix</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9</strong> An optional suffix that's <em>appended</em> to each property name prior to resolution.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>suffixToken</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>}}<br clear="none"></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9</strong> This token is used to mark the end of a property placeholder definition.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>systemPropertiesMode</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>int</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>2</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.16</strong> The mode to use for whether to resolve and use system properties:</p><p><strong><code>0</code></strong> = never - JVM system properties are never used.<br clear="none"><strong><code>1</code></strong> = fallback - JVM system properties are only used as fallback if no regular property with the key exists.<br clear="none"><strong><code>2</code></strong> = override - JVM system properties are used if exists, otherwise the regular property will be used.</p> + <div class="confluence-information-macro confluence-information-macro-warning"> + <p class="title">Bridging Spring and Camel Property Placeholders</p> + <span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"></span> + <div class="confluence-information-macro-body"> + When bridging to Spring's property placeholder using + <strong><code>org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer</code></strong> the configuration on + <strong><code>BridgePropertyPlaceholderConfigurer</code></strong> will take precedence over the configuration on the + <strong><code>PropertiesComponent</code></strong>.  + </div> + </div></td></tr></tbody></table> +</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 <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 <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><property-placeholder></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 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 <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-Format">Format</h3><p>The value of a Camel property can be obtained by specifying its key name within a property placeholder, using 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"><![CDATA[{{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 <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 <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="Properties-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="borde r-width: 1px;"><div class="codeContent panelContent pdl"> <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[pc.setLocation("com/mycompany/myprop.properties,com/mycompany/other.properties"); pc.setLocation(new String[] {"com/mycompany/myprop.properties", "com/mycompany/other.properties"});Â ]]></script> -</div></div><div><p>From<strong> Camel 2.19.0</strong>: you can set which location can be discarded if missing by setting  <strong><code>optional=true</code></strong>, (<strong><code>false</code></strong> by default).</p><p>Example:</p></div><div><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +</div></div><div><p>From<strong> Camel 2.19.0</strong>: you can set which location can be discarded if missing by setting  <strong><code>optional=true</code></strong>, (<strong><code>false</code></strong> by default).</p><p>Example:</p></div><div><p> </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("com/mycompany/override.properties;optional=true,com/mycompany/defaults.properties");]]></script> </div></div><p> </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 Modified: websites/production/camel/content/using-propertyplaceholder.html ============================================================================== --- websites/production/camel/content/using-propertyplaceholder.html (original) +++ websites/production/camel/content/using-propertyplaceholder.html Fri Feb 17 20:20:09 2017 @@ -86,12 +86,12 @@ <tbody> <tr> <td valign="top" width="100%"> -<div class="wiki-content maincontent"><h2 id="UsingPropertyPlaceholder-UsingPropertyPlaceholder">Using <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 <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><property-placeholder></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 proper ty 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 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 <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-Format">Format</h3><p>The value of a Camel property can be obtained by specifying its key name within a property placeholder, using 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"> +<div class="wiki-content maincontent"><h2 id="UsingPropertyPlaceholder-UsingPropertyPlaceholder">Using <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 <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><property-placeholder></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 Proper ty 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 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 <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-Format">Format</h3><p>The value of a Camel property can be obtained by specifying its key name within a property placeholder, using 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"><![CDATA[{{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 <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">Us ing <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="UsingPropertyPlaceholder-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"><![CDATA[pc.setLocation("com/mycompany/myprop.properties,com/mycompany/other.properties"); pc.setLocation(new String[] {"com/mycompany/myprop.properties", "com/mycompany/other.properties"});Â ]]></script> -</div></div><div><p>From<strong> Camel 2.19.0</strong>: you can set which location can be discarded if missing by setting  <strong><code>optional=true</code></strong>, (<strong><code>false</code></strong> by default).</p><p>Example:</p></div><div><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +</div></div><div><p>From<strong> Camel 2.19.0</strong>: you can set which location can be discarded if missing by setting  <strong><code>optional=true</code></strong>, (<strong><code>false</code></strong> by default).</p><p>Example:</p></div><div><p> </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("com/mycompany/override.properties;optional=true,com/mycompany/defaults.properties");]]></script> </div></div><p> </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