To support a more flexible Git repo structure it would be good if the {placeholder} support was supported in the searchPaths option. Ideally we should be able to support having a single repo with config store under application (and profile) structure. Current implementation requires change to the searchPaths entry on the config server whenever a new application is added.

spring:
  cloud:
    config:
      server:
        git:
          uri: https://xxxx/config-repo.git
          searchPaths: {application}

Comment From: superfly72

I've tried this with 1.1.0.M5 but doesn't seem to work with either https or ssh git repo's.

(application.yml)

spring:
  cloud:
    config:
      server:
        git:
          #uri: ssh://xxxxx:7999/mic/cloudconfig.git
          uri: https://xxxxxx/scm/mic/cloudconfig.git
          cloneOnStart: true
          searchPaths: {application}
(cloudconfig repo)
├── application.properties
├── application.yml
└── demo-app
    ├── demo-app-dev.yml
    ├── demo-app-prod.yml
    ├── demo-app.yml
    ├── devcloud.js
    └── simple.conf

Test - use URL: http://localhost:8888/demo-app/dev

Expected result: 4 resource files returned (application.properties, application.yml, demo-app.yml, demo-app-dev.yml) Actual result: 2 resource files returned (application.properties, application.yml)

Comment From: dsyer

Works for me. You need to quote the search paths value in YAML ("{" is not a valid literal). Maybe that's the problem?

Comment From: superfly72

quoting in the yaml file fixed my issue. Thanks.

spring:
  cloud:
    config:
      server:
        git:
          #uri: ssh://xxxxx:7999/mic/cloudconfig.git
          uri: https://xxxxxx/scm/mic/cloudconfig.git
          cloneOnStart: true
          searchPaths: "{application}"

Comment From: olayinkasf

The solution with quotes is currently not working for me

Comment From: dsyer

Probably a different issue then. This one is closed (you might have noticed?). It would be best if you can create a sample that reproduces the issue you see and then open another issue.

Comment From: frustrateddevelopers

Works for me. You need to quote the search paths value in YAML ("{" is not a valid literal). Maybe that's the problem?

I was also making same mistake, after quoting in doublesquotes it worked for me

Comment From: bharath324

Strange i am using spring-cloud-server 3.1.3 and it actually works without quotations i.e. {application} or {label} works but not "{application}" or '{application}' (as per the spring docs)