diff --git a/spring-cloud-vault-config/src/main/java/org/springframework/cloud/vault/config/LeasingVaultPropertySourceLocator.java b/spring-cloud-vault-config/src/main/java/org/springframework/cloud/vault/config/LeasingVaultPropertySourceLocator.java index b8d2706e..87b74658 100644 --- a/spring-cloud-vault-config/src/main/java/org/springframework/cloud/vault/config/LeasingVaultPropertySourceLocator.java +++ b/spring-cloud-vault-config/src/main/java/org/springframework/cloud/vault/config/LeasingVaultPropertySourceLocator.java @@ -80,7 +80,9 @@ class LeasingVaultPropertySourceLocator extends VaultPropertySourceLocatorSuppor protected PropertySource createVaultPropertySource( SecretBackendMetadata accessor) { - RequestedSecret secret = RequestedSecret.renewable(accessor.getPath()); + RequestedSecret secret = accessor instanceof GenericSecretBackendMetadata + ? RequestedSecret.rotating(accessor.getPath()) + : RequestedSecret.renewable(accessor.getPath()); if (properties.isFailFast()) { return createVaultPropertySourceFailFast(secret, accessor);