Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring云配置目录结构_Spring_Git_Spring Cloud - Fatal编程技术网

Spring云配置目录结构

Spring云配置目录结构,spring,git,spring-cloud,Spring,Git,Spring Cloud,我有一个工作的SpringCloudConfig服务器,它从git存储库提供配置。所有配置都存储在存储库的根目录中。它们被命名为{name}-{profile}.yml 我已将目录结构更改为{name}/{profile}.yml 当我curlhttp://configserver:8888/appname/myprofile配置服务器收到json响应,但propertySources为空 我的spring云服务器配置 spring: cloud: config: ser

我有一个工作的SpringCloudConfig服务器,它从git存储库提供配置。所有配置都存储在存储库的根目录中。它们被命名为
{name}-{profile}.yml


我已将目录结构更改为
{name}/{profile}.yml

当我
curlhttp://configserver:8888/appname/myprofile
配置服务器收到json响应,但propertySources为空

我的spring云服务器配置

spring:
  cloud:
    config:
      server:
        git:
          uri: http://git@git.host/scm/cas/application-config.git

您需要将
cloud.config.server.git.searchpath
添加到configuration server application.yml

   cloud:
     config:
       server:
         git:
           searchPaths: <directory>
云:
配置:
服务器:
吉特:
搜索路径:

{name}/{profile}.yml
不起作用。稍后我会给出更详细的回答(目前没有时间),我想留下评论。您可以使用目录和正则表达式来管理扩展。您还可以使用多个git存储库(即每个团队一个repo)?