I tried:
mvn -Dspring.profiles.active=dev spring-boot:run
but it does not affect my default configuration. I\'ve googled a little and found:
Try running your application with:
mvn spring-boot:run -Drun.jvmArguments="-Dspring.profiles.active=dev"
I don't know which version your are using but check this issue too