spring cloud config


  1. 加载 本地物理环境
    spring:
      profiles:
        active: native
      cloud:
        config:
          server:
            native:
              search-locations: file:E:\zhongkesoft\configRegistryDev\{application}

    {application}占位符
    http://localhost:9001/portal/native
  2. 加载本地项目配置文件

    server:
      port: 9001
    
    spring:
      profiles:
        active: native
      cloud:
        config:
          server:
            native:
              search-locations: classpath:/config
    

原文地址:https://www.cnblogs.com/root429/p/9251319.html