Provides a way to disable DecryptEnvironmentPostProcessor.
Fixes gh-927
This commit is contained in:
@@ -98,6 +98,16 @@ public class EncryptionIntegrationTests {
|
||||
then(context.getEnvironment().getProperty("foo.password")).isEqualTo("test");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void decryptEnvironmentPostProcessorDisabled() {
|
||||
ConfigurableApplicationContext context = new SpringApplicationBuilder(TestAutoConfiguration.class)
|
||||
.web(WebApplicationType.NONE).properties("spring.config.use-legacy-processing=false", "encrypt.key:pie",
|
||||
"spring.cloud.decrypt-environment-post-processor.enabled=false",
|
||||
"foo.password:{cipher}bf29452295df354e6153c5b31b03ef23c70e55fba24299aa85c63438f1c43c95")
|
||||
.run();
|
||||
then(context.getEnvironment().getProperty("foo.password")).startsWith("{cipher}bf2945");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void symmetricConfigurationProperties() {
|
||||
ConfigurableApplicationContext context = new SpringApplicationBuilder(TestAutoConfiguration.class)
|
||||
|
||||
Reference in New Issue
Block a user