You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I add spring-cloud-config-aws-kms into the pom.xml, shown below, I have a not unique bean error.
***************************
APPLICATION FAILED TO START
***************************
Description:
Field encryptor in org.springframework.cloud.bootstrap.encrypt.EncryptionBootstrapConfiguration required a single bean, but 2 were found:
- defaultTextEncryptor: defined by method 'defaultTextEncryptor' in org.springframework.cloud.config.server.config.EncryptionAutoConfiguration$DefaultTextEncryptorConfiguration
- kmsTextEncryptor: defined by method 'kmsTextEncryptor' in de.zalando.spring.cloud.config.aws.kms.KmsEncryptionConfiguration$KmsTextEncryptorConfiguration
Caused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'org.springframework.security.crypto.encrypt.TextEncryptor' available: expected single matching bean but found 2: defaultTextEncryptor,kmsTextEncryptor
I believe it is due to your first dependency, which includes a TextEncryptor (org.springframework.cloud.config.server.config.EncryptionAutoConfiguration$DefaultTextEncryptorConfiguration).
Looking at the current code in Spring Cloud, I think even though there is a ConditionalOnMissingBean, the default still gets loaded as it is loaded before the zalando lib?
I'd first try disabling spring.cloud.config.server.encrypt.enabled, and then if that didn't work, would move the zalando dep to the top of the pom.
When I add
spring-cloud-config-aws-kms
into the pom.xml, shown below, I have a not unique bean error.The text was updated successfully, but these errors were encountered: