Use encrypt.fail-on-error in DecryptEnvironmentPostProcessor

Fixes gh-882
This commit is contained in:
spencergibb
2021-01-11 11:56:29 -05:00
parent 7744a7f6d2
commit eb32ea8f21
2 changed files with 24 additions and 1 deletions

View File

@@ -80,7 +80,7 @@ public class DecryptEnvironmentPostProcessor extends AbstractEnvironmentDecrypt
KeyProperties keyProperties = binder.bind(KeyProperties.PREFIX, KeyProperties.class)
.orElseGet(KeyProperties::new);
if (keysConfigured(keyProperties)) {
setFailOnError(keyProperties.isFailOnError());
if (ClassUtils.isPresent("org.springframework.security.rsa.crypto.RsaSecretEncryptor", null)) {
RsaProperties rsaProperties = binder.bind(RsaProperties.PREFIX, RsaProperties.class)
.orElseGet(RsaProperties::new);