heldt
heldt

Reputation: 4266

Spring cloud config directory structure

I have a working Spring cloud config server who provides configuration from a git repository. All configurations are stored in the root directory in the repository. They are named {name}-{profile}.yml.

I have changed the directory structure to {name}/{profile}.yml

When I curl http://configserver:8888/appname/myprofile the config server I get a json response but the propertySources is empty.

My spring cloud server config

spring:
  cloud:
    config:
      server:
        git:
          uri: http://[email protected]/scm/cas/application-config.git

Upvotes: 3

Views: 2782

Answers (1)

Oreste
Oreste

Reputation: 456

You need to add cloud.config.server.git.searchPaths to the configuration server application.yml.

   cloud:
     config:
       server:
         git:
           searchPaths: <directory>

Upvotes: 5

Related Questions