Just some updates:

    I have tried to put the decryption logic in my customized class that
extends Spring's PropertyOverrideConfigurer, but it didn't work.
       Here is the bean definition in the context file.

       <bean class="MyPropertyPlaceholderConfigurer">
        <property name="order" value="0" />
        <property name="locations">
            <list>
                <value>classpath:myProperty.properties</value>
            </list>
        </property>
    </bean>
 
     and Java (sudo)code: 
     public class MyPropertyOverrideConfigurer extends
PropertyOverrideConfigurer {
     ...
    @Override
    protected void convertProperties(Properties props) {        
         for every property in props,
             if property.name="password"{
                props.remove(property.value)
                props.setValue(decrypt(property.value))
             }              
    }
    ...
 }
     When I was debugging the code, I saw that the "password" property was
decrypted, and stored in the Properties object("props"), however I guess
when I referred to ${properties: password} in <camel:simple> expression,
Camel still tries to load the password property from myProperty.properties
file and just ignored the value that was already existed in "props" object,
is that what is happening?
     
     Any thoughts or comments are appreciated. 


-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Is-that-possible-to-override-the-properties-that-are-loaded-from-classpath-tp3266760p3266763.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to