How do I activate a Spring Boot profile when running from IntelliJ?

前端 未结 13 1560
醉梦人生
醉梦人生 2021-01-30 00:09

I have 5 environments:

 - local (my development machine)
 - dev
 - qc
 - uat
 - live
 - staging

I want different application properties to be u

13条回答
  •  春和景丽
    2021-01-30 00:12

    I use the Intellij Community Edition. Go to the "Run/Debug Configurations" > Runner tab > Environment variables > click button "...". Add: SPRING_PROFILES_ACTIVE = local

    spring.profiles.active

提交回复
热议问题