Development and Production application.properties
It is very common to have properties file for local, dev, and prod environment. Mostly use it to handle the database connection setting. To do this:
- In the main application.properties file add a line
spring.profiles.active=local
- Create the file
application-local.properties
file. - Put your local specific properties in that file.
- You can also use this same logic to create
application-dev.properties
, orapplication-prod.properties
, or whatever you name it as soon as you set thespring.profiles.active
correctly