Use unique bean names for SecretBackendMetadataFactory beans.
We now use unique bean names for SecretBackendMetadataFactory beans for bean definition. Previously, we used the same bean name (secretBackendMetadataFactory) across all bean definitions which causes definition overrides. The overrides erased previously defined beans so only a single instance of SecretBackendMetadataFactory was defined and using multiple Spring Cloud Vault modules at the same time was not possible. Closes gh-94.
This commit is contained in:
@@ -38,7 +38,7 @@ import org.springframework.vault.core.util.PropertyTransformer;
|
||||
public class VaultConfigAwsBootstrapConfiguration {
|
||||
|
||||
@Bean
|
||||
public SecretBackendMetadataFactory<VaultAwsProperties> secretBackendMetadataFactory() {
|
||||
public SecretBackendMetadataFactory<VaultAwsProperties> awsSecretBackendMetadataFactory() {
|
||||
return new AwsSecretBackendMetadataFactory();
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ import org.springframework.vault.core.util.PropertyTransformer;
|
||||
public class VaultConfigConsulBootstrapConfiguration {
|
||||
|
||||
@Bean
|
||||
public SecretBackendMetadataFactory<VaultConsulProperties> secretBackendAccessorFactory() {
|
||||
public SecretBackendMetadataFactory<VaultConsulProperties> consulSecretBackendAccessorFactory() {
|
||||
return new ConsulSecretBackendMetadataFactory();
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ import org.springframework.vault.core.util.PropertyTransformer;
|
||||
public class VaultConfigDatabaseBootstrapConfiguration {
|
||||
|
||||
@Bean
|
||||
public SecretBackendMetadataFactory<DatabaseSecretProperties> secretBackendMetadataFactory() {
|
||||
public SecretBackendMetadataFactory<DatabaseSecretProperties> databaseSecretBackendMetadataFactory() {
|
||||
return new DatabaseSecretBackendMetadataFactory();
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ import org.springframework.vault.core.util.PropertyTransformer;
|
||||
public class VaultConfigRabbitMqBootstrapConfiguration {
|
||||
|
||||
@Bean
|
||||
public SecretBackendMetadataFactory<VaultRabbitMqProperties> secureBackendAccessorFactory() {
|
||||
public SecretBackendMetadataFactory<VaultRabbitMqProperties> rabbitMqSecureBackendAccessorFactory() {
|
||||
return new RabbitMqSecretBackendMetadataFactory();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user