camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Is that possible to override the properties that are loaded from classpath?
Date Tue, 16 Nov 2010 16:24:18 GMT

You can also implement your custom PropertyResolver and set it on the
Properties component.
Then you can control how the properties is resolved.

But as Willem said, maybe the jasypt encryption stuff is something
that works for you.
Then you can use that out of the box.

On Tue, Nov 16, 2010 at 2:50 AM, yli <> wrote:
> Hi all,
>       Now in my project, I am trying to load a password value from the
> property file(or technically speaking from classpath).
>       But it is not a good idea to write the clear text of password in the
> property file, so I decided to put the encrypted string of the password in
> the property file and decrypted it on the fly after loading from the
> property.
>       Here is some code to make the problem more clear:
>       In the property file( I have:
>       ...
>       password=encryptedPassword
>       ...
>       In the camle context file, I have
>       <bean id="properties"
> class="">
>        <property name="locations"
>                  value="" />
>       </bean>
>       Basically I want to decrypt "password" at runtime and refer it in a
> <camel:simple> expression, for example:
> <camel:simple>password=${properties:password}</camel:simple>
>       Is there an easy way to achieve this?
>       Thank you very much!
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Twitter: davsclaus
Author of Camel in Action:

View raw message