Different property variable for Local and prod Environment (Spring)

后端 未结 5 1060
梦如初夏
梦如初夏 2020-12-08 00:44

I am working on an Spring web application in where I need to have variable\'s that will have different value in local environment and other value in production environment.<

5条回答
  •  青春惊慌失措
    2020-12-08 01:24

    you can add -Dspring.profile.active=local in your spring boot application, when you start your server. It will pick application-local.properties

提交回复
热议问题