Setting the default active profile in Spring-boot

前端 未结 14 1912
感动是毒
感动是毒 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 08:59

    Try this: @PropertySource("classpath:${spring.profiles.active:production}_file.properties")

提交回复
热议问题