springboot-profile

 

application.properties 

  server.port = 8080

  spring.profile.active = dev[ 激活dev不用默认 ]

 application-dev.properties 

  server.port = 8081

 application-prod.properties 

      server.port = 8082

默认使用application.properties 

--------------------------------------------------------------------------

      

 

------------------------------------------------------------------------------

配置文件加载位置

跟上面配置

 

 

 

所谓的外部加载

posted @ 2019-02-27 00:16  絵飛ヾ的魚  阅读(121)  评论(0编辑  收藏  举报