2019年8月22日星期四

Intellij IDEA整合 spring profile



例如:
- application.properties  (containing common properties)
 - application-local.properties


  • Choosing Run | Edit Configurations...
  • Go to the Configuration tab
  • Expand the Environment section to reveal VM options

  • -Dspring.profiles.active=local




    最後  , Build > Rebuild Project 才會生效


    參考 :
    https://stackoverflow.com/questions/39738901/how-do-i-activate-a-spring-boot-profile-when-running-from-intellij


    沒有留言: