Add missing reflection hints for EncryptionBootstrapConfiguration. Fixes gh-1245.

This commit is contained in:
Olga MaciaszekSharma
2023-06-26 17:53:59 +02:00
parent 3df50061ac
commit a22bb12e75
2 changed files with 16 additions and 0 deletions

View File

@@ -16,6 +16,9 @@
package org.springframework.cloud.bootstrap.encrypt;
import org.springframework.aot.hint.MemberCategory;
import org.springframework.aot.hint.RuntimeHints;
import org.springframework.aot.hint.RuntimeHintsRegistrar;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
@@ -142,4 +145,15 @@ public class EncryptionBootstrapConfiguration {
}
class EncryptionHints implements RuntimeHintsRegistrar {
@Override
public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
hints.reflection().registerTypeIfPresent(classLoader,
"org.springframework.security.rsa.crypto.RsaSecretEncryptor",
MemberCategory.INVOKE_DECLARED_CONSTRUCTORS);
}
}
}

View File

@@ -0,0 +1,2 @@
org.springframework.aot.hint.RuntimeHintsRegistrar=\
org.springframework.cloud.bootstrap.encrypt.EncryptionBootstrapConfiguration.EncryptionHints