how to use Spring Boot profiles

前端 未结 12 1173
忘了有多久
忘了有多久 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:59

    You can specify properties according profiles in one application.properties(yml) like here. Then mvn clean spring-boot:run -Dspring.profiles.active=dev should run it correct. It works for me

提交回复
热议问题