For this example, we assumed the we are using trial.blueprint.cfg file which is saved at the [FUSE_FOLDER]/etc/trial.blueprint.cfg
-
[FUSE_FOLDER]/etc/trial.blueprint.cfg content;
in.server.host=//localhost in.server.port=9002 in.server.protocol=http in.server.uri.pattern=employee out.server.host=//localhost out.server.port=9002 out.server.protocol=http out.server.uri.pattern=external/callmoko/api -
Open blueprint.xml on Source tab
-
We need to add to entries to recognized our property file
- Adding xmlns:cm to the blueprint tag
- From:
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd http://camel.apache.org/schema/blueprint https://camel.apache.org/schema/blueprint/camel-blueprint.xsd">- To:
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd http://camel.apache.org/schema/blueprint https://camel.apache.org/schema/blueprint/camel-blueprint.xsd">- Adding the actual code to enable our property file, add below code above the <camelContext id=" tag
<!-- blueprint property placeholders, that will use etc/stuff.cfg as the properties file --> <cm:property-placeholder persistent-id="trial.blueprint" update-strategy="reload"/>- The whole blueprint.xml code example would be;
<?xml version="1.0" encoding="UTF-8"?> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd http://camel.apache.org/schema/blueprint https://camel.apache.org/schema/blueprint/camel-blueprint.xsd"> <!-- blueprint property placeholders, that will use etc/trial.blueprint.cfg as the properties file --> <cm:property-placeholder persistent-id="trial.blueprint" update-strategy="reload"/> <camelContext id="_context1" xmlns="http://camel.apache.org/schema/blueprint"> <route id="_route1"/> </camelContext> </blueprint> -
To use, {{in.server.host}} or {{out.server.protocol}}