I am trying to configure some key/value pairs for my Azure web application using app settings section from Azure portal to my Spring boot java class. I have Spring boot project, now i want to fetch some static URL and other config values from the Aure web app that my Spring boot project hosted. How to get that?
For example as below. I have added activeDirectotyEnabled key and value as true in Azure portal.
I want to fetch the value of the name ‘activeDirectotyEnabled’ in my java class.
Please help how to get that?
2
Answers
If I am understanding your scenario correctly, You can connect your Spring Boot app to an App Configuration store and can externalize configuration properties to Azure App Configuration.
See this detailed tutorial: Quickstart: Create a Java Spring app with Azure App Configuration
As the description in the picture
So these are just environment variables, you can read them as any other environment var in Spring Boot
for example