I have a spring boot project where I wanted to disable the vault conditionally.
<dependency>
<groupId>org.springframework.vault</groupId>
<artifactId>spring-vault-core</artifactId>
<version>2.2.3.RELEASE</version>
</dependency>
The version I am using. How can I do that?
I have spring profile-based configurations in the code.
It really depends what do you mean by "disable" but you can use
spring.cloud.vault.enabledconfiguration to disable all Vault-related beans created by VaultAutoConfiguration.To disable Key-Value Backend that allows to load properties during the startup (bootstrap) phase you can use
spring.cloud.vault.kv.enabled.