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:
Mark Paluch
2017-04-05 19:39:17 +02:00
parent 0add1698d5
commit 44f3c10b9b
4 changed files with 4 additions and 4 deletions

View File

@@ -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();
}

View File

@@ -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();
}

View File

@@ -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();
}

View File

@@ -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();
}