#Set values obtained from azure key vault in spring boot

7 messages · Page 1 of 1 (latest)

acoustic steppe
#

I'm working with Spring Boot 2.7.11, Java 11, SQL Server 2022, JPA Hibernate

The main issue is that I am getting the data from azure key vault but I don't know how to set it to the bootstrap.properties file. The issue is that spring boot loads the above mentioned file before it can read the values of the secrets.

For that I implemented the class MyCommandLineRunner implements CommandLineRunner that in theory is executed before it loads the bootstrap.properties file to be able to read the values of the vault and set them to the bootstrap file ....

arctic flumeBOT
#

This post has been reserved for your question.

Hey @acoustic steppe! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

lime ridge
#

I'd also recommend not using the bootstrap.yml, Spring now recommends only using the application.yml, in conjuction with the Spring Cloud Config (I'm assuming you're using that since bootstrap is microservices

acoustic steppe
#

I am not really using Spring Cloud Config but I have used it to get Vault secrets, I will try to do it now for Azure Key Vault, thank you very much for your answer.

arctic flumeBOT