spring-cloud / spring-cloud-vault

Configuration Integration with HashiCorp Vault
http://cloud.spring.io/spring-cloud-vault/
Apache License 2.0
273 stars 152 forks source link

Unable to set token VaultTokenSupplier After implement #490

Closed ASHWIGUPTA closed 3 years ago

ASHWIGUPTA commented 3 years ago

**Describe the bug** Please provide details of the problem, including the version of Spring Cloud that you are using.

Sample If possible, please provide a test case or sample application that reproduces the problem. This makes it much easier for us to diagnose the problem and to verify that we have fixed it.

I try to assign a token in my custom class. That class implements VaultTokenSupplier class and I am assigned my token there. But it not pick my new token.

@Configuration
public class VaultTokenConfig  implements VaultTokenSupplier
{

    @Override
    public Mono<VaultToken> getVaultToken() {

        return Mono.just( VaultToken.of("00000000-0000-0000-0000-000000000000"));
    }

}
mp911de commented 3 years ago

All configuration for Spring Cloud Vault 2.x needs to be applied in the Bootstrap Context and config classes must be registered with spring.factories. See the reference documentation for further guidance.

ASHWIGUPTA commented 3 years ago

it's not working, can you please provide some examples.

mp911de commented 3 years ago

Here you go: https://github.com/mp911de/spring-cloud-vault-config-samples/tree/main/spring-cloud-vault/customize

If the issue persists, please provide a minimal reproducer.

mp911de commented 3 years ago

Closing due to lack of activity. If you would like us to look at this issue, please provide additional information and we will re-open the issue.