camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From camel_user <maxd_...@hotmail.com>
Subject Camel dynamic properties placeholder substitution in Spring XML
Date Sat, 16 Jun 2012 08:13:41 GMT
Hi, 

Is there a way in camel to substitute property placeholders in Spring XML?
What I mean by this is something along the lines of:

In my properties file I want to have:

dynamic.path=direct:myvery{0}complexroutename

and in spring XML 

<route>
	<from uri="direct:someuri" />
	<to uri="${properties:dynamic.path}" />
</route>

however the {0} bit in the route is dynamic and has to be injected at
runtime.

I guess in java DSL I could use something like this to get the dynamic route

String route=MessageFormat.format((String) props.get("dynamic.path"),
"substitution");

But is there anything similar that can be done in Spring xml?

Thanks!


--
View this message in context: http://camel.465427.n5.nabble.com/Camel-dynamic-properties-placeholder-substitution-in-Spring-XML-tp5714573.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message