Closed mp911de closed 1 year ago
Delaying the initialization causes the annotation to miss the point to contribute configuration data early on during bean configuration. We recommend using @VaultPropertySource
in combination with AbstractVaultConfiguration
to provide the required infrastructure separately from potential auto-configuration.
VaultPropertySourceRegistrar
performs an early bean lookup viabeanFactory.getBeansOfType(…)
to obtain property sources. While this lookup allows for early initialization of components, it triggers in case of Spring Boot the initialization ofVaultAutoConfiguration
too early which fails with constructor resolution.We can delay the initialization but that comes at the cost of vault property sources being activated after running the bean postprocessor.
This issue was originally reported via https://github.com/spring-cloud/spring-cloud-vault/issues/642