I am following this tutorial so that Maven will replace values in my application.properties file depending on the build profile:
It states to put some config files under the "profiles" directory. Where is this directory? I created a folder named "profiles" in the root of the project directory.
How do I activate a profile? I Googled around and I added -P to the commands, for example "mvn test" would be "mvn test -P staging"
Needless to say, it is not working. Even when the default profile "dev" is supposed to be activated without any action necessary, my application.properties file is not affected.
application-dev.propertieswhereas theapplication.propertiesis the default. You can have as many as you wish. Those spring boot profiles can be activated via--spring.profiles.active=devfor example. No directories needed etc. - khmarbaise