camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Camel dynamic properties placeholder substitution in Spring XML
Date Sat, 16 Jun 2012 09:04:41 GMT
Hi

See these FAQs
http://camel.apache.org/how-do-i-use-spring-property-placeholder-with-camel-xml.html
http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html

On Sat, Jun 16, 2012 at 10:13 AM, camel_user <maxd_001@hotmail.com> wrote:

> 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.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message