Spring / Spring Boot
What is Spring profile?
Spring profiles provide a way to segregate parts of your application configuration, allows logical grouping of configurations based on environment and make it be available only in certain environments.
Spring Boot by default, creates the property file, application.properties. To create spring profiles based on environments, we will create different property files, one per environment.
application-DEV.properties,application-SIT.properties,application-PROD.properties, etc.
The application.properties file will still be active and acts as the parent of all env specific properties. In this file, we may specify which profile to activate by specifying in the property spring.profiles.active.
spring.profiles.active = DEV
More Related questions...