|
Page Edited :
CAMEL :
How do I use Spring Property Placeholder with Camel XML
How do I use Spring Property Placeholder with Camel XML has been edited by Claus Ibsen (Nov 15, 2008). Content:How do I use Spring Property Placeholder with Camel XMLWe don't yet support the ${something} notation inside arbitrary Camel XML. For example at the time of writing this is not supported <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd "> <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/> <camelContext xmlns="http://activemq.apache.org/camel/schema/spring"> <route> <from ref="activemq:${someQueueName}"/> <to uri="mock:results"/> </route> </camelContext> </beans> However you can use the <endpoint/> element to define endpoints which does support the property resolving which you can then refer to by name or reference in XML or Java code. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd "> <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/> <camelContext xmlns="http://activemq.apache.org/camel/schema/spring"> <endpoint id="input1" uri="activemq:${someQueueName}"/> <route> <from ref="input1"/> <to uri="activemq:OutputQueue"/> </route> </camelContext> </beans> To fully support propert placeholders Spring 3.0 is required due to a limitation in Spring 2.x. See JIRA SPR-4466 |
Powered by
Atlassian Confluence
(Version: 2.2.9 Build:#527 Sep 07, 2006)
-
Bug/feature request
Unsubscribe or edit your notifications preferences
Unsubscribe or edit your notifications preferences
