Browse Source

Merge remote-tracking branch 'origin/4.0.x'

pull/1255/head
Olga MaciaszekSharma 1 year ago
parent
commit
1a04b22591
  1. 14
      spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/encrypt/EncryptionBootstrapConfiguration.java
  2. 2
      spring-cloud-context/src/main/resources/META-INF/spring/aot.factories

14
spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/encrypt/EncryptionBootstrapConfiguration.java

@ -16,6 +16,9 @@ @@ -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 { @@ -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);
}
}
}

2
spring-cloud-context/src/main/resources/META-INF/spring/aot.factories

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