You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Gustav Sinder <gu...@ferrologic.se> on 2015/11/02 14:45:55 UTC

Characters getting escaped when read from properties file

Hi,

I've got a password in a properties file configured as (simplified):
password=H+r/GbP8

The properties file is refered to in the blueprint as:
<cm:property-placeholder persistent-id="myConfig"/>

The property is used for a bean with:
<property name="password" value="${password}" />

The password is read from the file but as "H+r%2FGbP8" (encoded)

How could I get the literal value from the properties file? If that's not possible, how do I properly escape the forward slash in the value?
I've tried backslash, double backslash and so on without any success.

Thanks
/Gustav

RE: Characters getting escaped when read from properties file

Posted by Gustav Sinder <gu...@ferrologic.se>.
Beautiful, that did the trick. Thanks!

Thanks
/Gustav

-----Original Message-----
From: Hans Orbaan [mailto:hans.orbaan@docdata.eu] 
Sent: den 2 november 2015 15:52
To: users@camel.apache.org
Subject: RE: Characters getting escaped when read from properties file

Hi,

Use: RAW(yourPassword)

See: http://camel.apache.org/configuring-camel.html

With kind regards


-----Oorspronkelijk bericht-----
Van: Gustav Sinder [mailto:gustav.sinder@ferrologic.se] 
Verzonden: Monday 2 November 2015 14:46
Aan: users@camel.apache.org
Onderwerp: Characters getting escaped when read from properties file

Hi,

I've got a password in a properties file configured as (simplified):
password=H+r/GbP8

The properties file is refered to in the blueprint as:
<cm:property-placeholder persistent-id="myConfig"/>

The property is used for a bean with:
<property name="password" value="${password}" />

The password is read from the file but as "H+r%2FGbP8" (encoded)

How could I get the literal value from the properties file? If that's not possible, how do I properly escape the forward slash in the value?
I've tried backslash, double backslash and so on without any success.

Thanks
/Gustav

RE: Characters getting escaped when read from properties file

Posted by Hans Orbaan <ha...@docdata.eu>.
Hi,

Use: RAW(yourPassword)

See: http://camel.apache.org/configuring-camel.html

With kind regards


-----Oorspronkelijk bericht-----
Van: Gustav Sinder [mailto:gustav.sinder@ferrologic.se] 
Verzonden: Monday 2 November 2015 14:46
Aan: users@camel.apache.org
Onderwerp: Characters getting escaped when read from properties file

Hi,

I've got a password in a properties file configured as (simplified):
password=H+r/GbP8

The properties file is refered to in the blueprint as:
<cm:property-placeholder persistent-id="myConfig"/>

The property is used for a bean with:
<property name="password" value="${password}" />

The password is read from the file but as "H+r%2FGbP8" (encoded)

How could I get the literal value from the properties file? If that's not possible, how do I properly escape the forward slash in the value?
I've tried backslash, double backslash and so on without any success.

Thanks
/Gustav