@ -163,25 +163,21 @@ public class EnvironmentDecryptApplicationInitializer implements
@@ -163,25 +163,21 @@ public class EnvironmentDecryptApplicationInitializer implements
@ -193,6 +189,28 @@ public class EnvironmentDecryptApplicationInitializer implements
@@ -193,6 +189,28 @@ public class EnvironmentDecryptApplicationInitializer implements
if(property!=null){
Stringvalue=property.toString();
if(value.startsWith("{cipher}")){
value=value.substring("{cipher}".length());
try{
value=this.encryptor.decrypt(value);
if(logger.isDebugEnabled()){
logger.debug("Decrypted: key="+key);
}
}
catch(Exceptione){
Stringmessage="Cannot decrypt: key="+key;
if(this.failOnError){
thrownewIllegalStateException(message,e);
}
if(logger.isDebugEnabled()){
logger.warn(message,e);
}
else{
logger.warn(message);
}
// Set value to empty to avoid making a password out of the
// cipher text
value="";
}
overrides.put(key,value);
if(COLLECTION_PROPERTY.matcher(key).matches()){
sourceHasDecryptedCollection=true;
@ -215,42 +233,11 @@ public class EnvironmentDecryptApplicationInitializer implements
@@ -215,42 +233,11 @@ public class EnvironmentDecryptApplicationInitializer implements
@ -153,22 +150,4 @@ public class EnvironmentDecryptApplicationInitializerTests {
@@ -153,22 +150,4 @@ public class EnvironmentDecryptApplicationInitializerTests {