i have application.yml
,application-dev.yml
andapplication-dev.yml
- I'm using the maven command
mvn spring-boot:run -Dspring.profiles.active=dev
it doesn't work and I can not choose the dev profile usingmvn spring-boot:run
. How do I choose it? - The documentation says
java -jar XXX.jar --spring.profiles.active=dev
works, and I tried-Dspring.profiles.active=dev
but it does not work. And in my project, i usejava -jar XXX.jar
it runs, but if I usejava -jar XXX.jar --spring.profiles.active=dev
to choose dev profile, console print so many logs and warns that i never see usedjava -jar XXX.jar
,and tell meAPPLICATION FAILED TO START
so how to solve two problems? thanks~