Spring Boot : Configuring environment variables

Omkar Birade
interleap
Published in
3 min readNov 7, 2019

--

In any spring boot application, at some point or the other you will have to externalise your configurations for obvious benefits.

As the application gets larger you have multiple environments like production, development, test etc each with their own specific configurations.

Spring provides many ways to do handle such scenarios by isolating different configurations and using them according to the environment.

Spring does this using something called as profile.

About which you can read more here:

There are many ways to configure profiles:

Most famous once involve using an application.properties file or a yaml file. About which you can read more here:

--

--

Omkar Birade
interleap

Co-Founder at Interleap. I write to learn more.