Member-only story
How to Use Profiles in Spring Boot
In this story we will learn how to use Profiles in Spring Boot Application.
Every enterprise application has many environments, like:
Dev | Test | Stage | Prod | UAT / Pre-Prod
Each environment requires a configurations that is specific to them. These environments host specific configurations called Profiles.
In this story I will create a simple spring boot project and will demonstrate how to setup Profiles for your Spring Boot application.
Let’s start with setting up a Spring Boot application from the https://start.spring.io/
Now Click On Generate then zip file of source code will be generated . Now we need to import this project into IDE (Eclipse).
In this example , we will create single rest endpoint that will load a spring property and I want to display as a Response for different profiles.
I have create 3 profiles in spring boot application. We also need to follow the…