I have a spring boot application.
I have three profiles in my application-> development, staging and production. So I have 3 files
Michael Yin's answer is correct but a better explanation seems to be required!
A lot of you mentioned that -D is the correct way to specify JVM parameters and you are absolutely right. But Michael is also right as mentioned in Spring Boot Profiles documentation.
What is not clear in the documentation, is what kind of parameter it is: --spring.profiles.active is a not a standard JVM parameter so if you want to use it in your IDE fill the correct fields (i.e. program arguments)