Field encryptor in org.springframework.cloud.config.server.config.EncryptionAutoConfiguration$EncryptorConfiguration required a single bean, but 2 were found:
- defaultTextEncryptor: defined in null
- textEncryptor: a programmatically registered singleton
Comment From: edudar
I'm using 3.1.2 and I might have the same or similar issue:
org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'org.springframework.cloud.config.server.config.ConfigServerEncryptionConfiguration':
Unsatisfied dependency expressed through field 'encryptor';
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'singleTextEncryptorLocator':
Unsatisfied dependency expressed through method 'singleTextEncryptorLocator' parameter 0;
nested exception is 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,textEncryptor
Comment From: OlgaMaciaszek
We had to revert the fix as it was causing a regression. We will be working towards ensuring the support for this in Spring 6.