Setting the default active profile in Spring-boot

前端 未结 14 1913
感动是毒
感动是毒 2020-12-13 08:20

I want my default active profile to be production if -Dspring.profiles.active is not set.

I tried the following in my application.pro

14条回答
  •  悲哀的现实
    2020-12-13 09:16

    you can also have multiple listings in the @Profile annotation

    @Profile({"dev","default"})
    

    If you set "default" as an additional value, you don't have to specify spring.profiles.active

提交回复
热议问题