how to use Spring Boot profiles

前端 未结 12 1210
忘了有多久
忘了有多久 2020-12-04 21:14

i have application.yml,application-dev.ymlandapplication-dev.yml

  1. I\'m using the maven command mvn spring-boot:run
12条回答
  •  执念已碎
    2020-12-04 21:57

    If you are using the Spring Boot Maven Plugin, run:

    mvn spring-boot:run -Dspring-boot.run.profiles=foo,bar
    

    (https://docs.spring.io/spring-boot/docs/current/maven-plugin/examples/run-profiles.html)

提交回复
热议问题