You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Olaf <om...@gmail.com> on 2013/10/23 10:16:26 UTC

define properties in context.xml

Hello,

is it possible to define properties in spring xml directly without using a
.properties file? And then use them in java like that:

from(imap://imap.server.com?username={{user}}&password={{pass}})

or

from({{imapUri}})

I'd like to have only one xml config file

Thanks for help!



--
View this message in context: http://camel.465427.n5.nabble.com/define-properties-in-context-xml-tp5742054.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: define properties in context.xml

Posted by Olaf <om...@gmail.com>.
Thanks! I'll try that



--
View this message in context: http://camel.465427.n5.nabble.com/define-properties-in-context-xml-tp5742054p5742060.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: define properties in context.xml

Posted by Claus Ibsen <cl...@gmail.com>.
You can define them in a java.util.Properties bean - Maybe Spring has
a XML namespace syntax for that to make it nicer looking.

Then you can refer to this bean using ref: as shown on
http://camel.apache.org/using-propertyplaceholder.html

On Wed, Oct 23, 2013 at 10:16 AM, Olaf <om...@gmail.com> wrote:
> Hello,
>
> is it possible to define properties in spring xml directly without using a
> .properties file? And then use them in java like that:
>
> from(imap://imap.server.com?username={{user}}&password={{pass}})
>
> or
>
> from({{imapUri}})
>
> I'd like to have only one xml config file
>
> Thanks for help!
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/define-properties-in-context-xml-tp5742054.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen