Example usage for org.springframework.vault.core VaultSysOperations getMounts

List of usage examples for org.springframework.vault.core VaultSysOperations getMounts

Introduction

In this page you can find the example usage for org.springframework.vault.core VaultSysOperations getMounts.

Prototype

Map<String, VaultMount> getMounts() throws VaultException;

Source Link

Usage

From source file:org.springframework.vault.core.VaultTemplateTransitIntegrationTests.java

@Before
public void before() throws Exception {

    VaultSysOperations adminOperations = vaultOperations.opsForSys();

    if (!adminOperations.getMounts().containsKey("transit/")) {
        adminOperations.mount("transit", VaultMount.create("transit"));

        vaultOperations.write("transit/keys/mykey", null);
        vaultOperations.write("transit/keys/derived", Collections.singletonMap("derived", true));
    }/*from  www  .  j a v a2 s . co m*/
}