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 

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

      

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

配置文件加载位置

跟上面配置

 

 

所谓的外部加载

原文地址:https://www.cnblogs.com/But-you/p/10441140.html