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

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

    A probable cause could be that you do not pass the command line parameters into the applications main method. I made the same mistake some weeks ago.

    public static final void main(String... args) {
        SpringApplication.run(Application.class, args);
    }
    

提交回复
热议问题