Class VaultConfigTemplate

java.lang.Object
org.springframework.cloud.vault.config.VaultConfigTemplate
All Implemented Interfaces:
VaultConfigOperations

public class VaultConfigTemplate extends Object implements VaultConfigOperations
Central class to retrieve configuration from Vault.
Author:
Mark Paluch
See Also:
  • VaultOperations
  • Constructor Details

    • VaultConfigTemplate

      public VaultConfigTemplate(org.springframework.vault.core.VaultOperations vaultOperations, VaultProperties properties)
      Create a new VaultConfigTemplate given VaultOperations.
      Parameters:
      vaultOperations - must not be null.
      properties - must not be null.
  • Method Details

    • read

      public Secrets read(SecretBackendMetadata secretBackendMetadata)
      Description copied from interface: VaultConfigOperations
      Read secrets from a secret backend encapsulated within a SecretBackendMetadata. Reading data using this method is suitable for secret backends that do not require a request body.
      Specified by:
      read in interface VaultConfigOperations
      Parameters:
      secretBackendMetadata - must not be null.
      Returns:
      the configuration data. May be null.
    • getVaultOperations

      public org.springframework.vault.core.VaultOperations getVaultOperations()
      Specified by:
      getVaultOperations in interface VaultConfigOperations
      Returns:
      the underlying VaultOperations.