Annotation Type ConjurValue
-
@Documented @Target(FIELD) @Retention(RUNTIME) public @interface ConjurValue
The @ConjurValue annotation is a Conjur native annotation intended for new Spring Boot applications. Injecting the annotation into your Spring Boot code allows you to retrieve a single secret from the Conjur Vault.Example usage:
Given the path
policy/my-application/database.passwordcontaining the configuration data pairdatabase.password=mysecretpassword, the following@Configurationclass usesConjurValue).@Configuration public class AppConfig { @ConjurValues("policy/my-application/database.password") private String password; @Bean public TestBean testBean() { TestBean testBean = new TestBean(); testBean.setPassword(password); return testBean; } }