How do I use access.properties variables in an Azure Spring Boot deployed app?

Viewed 100

I have an Azure App Service, that's running my Spring Boot App, but in certain classes, I use the @Value("${}") annotation, to access variables from access.properties file. But it seems not to be working in the deployed app (production).

1 Answers

[Answering my question]

As it looks like, I can simply put the application.properties variables in Setting > Configuration > Application Settings tab, adding as a name:value pairs

Then Spring already finds the values with the @Value("${name}") annotation

twitter API configs

BONUS: The application.properties file, should be like this, if you are using Git CI/CD

enter image description here

Related