You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2016/04/22 11:12:12 UTC
[jira] [Commented] (CAMEL-9901) CameBlueprintTest support doesn't
update values in routes if placeholders are used
[ https://issues.apache.org/jira/browse/CAMEL-9901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15253590#comment-15253590 ]
Claus Ibsen commented on CAMEL-9901:
------------------------------------
You must use Camel's syntax for properties inside <camelContext> eg {{ }} style, not [ ] style.
> CameBlueprintTest support doesn't update values in routes if placeholders are used
> ----------------------------------------------------------------------------------
>
> Key: CAMEL-9901
> URL: https://issues.apache.org/jira/browse/CAMEL-9901
> Project: Camel
> Issue Type: Improvement
> Components: camel-test
> Reporter: Kevin Earls
> Priority: Minor
>
> If you specify placeholder-prefix and placeholder-suffix in a blueprint property-placeholder, properties are overridden correctly in beans, but not in routes. For example, if you apply the changes below to https://github.com/apache/camel/blob/master/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin-loadfileoverride.xml and run ConfigAdminLoadConfigurationFileAndOverrideTest it will fail because it can't substitute for "[destination]". If you leave the uris in the route set to "{{destination}}" the test will pass.
> <!-- blueprint property placeholders, that will use etc/stuff.cfg as the properties file -->
> - <cm:property-placeholder persistent-id="stuff" update-strategy="reload">
> + <cm:property-placeholder persistent-id="stuff" update-strategy="reload" placeholder-prefix="[" placeholder-suffix="]">
> <cm:default-properties>
> <cm:property name="greeting" value="Hello" />
> <cm:property name="echo" value="Hey" />
> @@ -34,8 +34,8 @@
>
> <!-- a bean that uses a blueprint property placeholder -->
> <bean id="myCoolBean" class="org.apache.camel.test.blueprint.MyCoolBean">
> - <property name="say" value="${greeting}"/>
> - <property name="echo" value="${echo}"/>
> + <property name="say" value="[greeting]"/>
> + <property name="echo" value="[echo]"/>
> </bean>
>
> <camelContext xmlns="http://camel.apache.org/schema/blueprint">
> @@ -43,9 +43,9 @@
> <route>
> <from uri="direct:start"/>
> <bean ref="myCoolBean" method="saySomething"/>
> - <to uri="{{destination}}"/>
> + <to uri="[destination]"/>
> <bean ref="myCoolBean" method="echoSomething"/>
> - <to uri="{{destination}}"/>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)