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

前端 未结 13 1672
醉梦人生
醉梦人生 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:35

    Try this. Edit your build.gradle file as followed.

    ext { profile = project.hasProperty('profile') ? project['profile'] : 'local' }
    

提交回复
热议问题