Set Spring Profile with Maven command line as a parameter

Spring and spring-boot can be run from the IDE, and the profile can be parse via environment variable, and sometimes it’s quick to use maven parameter

mvn -Pspring.profiles.active=development spring-boot:run
## If running with java command.
java -Dspring.profiles.active=development -jar yourApp.jar
Add to my src(0)

No account yet? Register