1

I have a simple Spring Cloud Config Server project (using spring-cloud-config-server-4.0.0)

With a default branch property set spring.cloud.config.server.git.default-label

This works without a label: GET http://localhost:8888/myAppName/myProfiles/test.txt?useDefaultLabel

This does not (path includes slash): GET http://localhost:8888/myAppName/myProfiles/path/test.txt?useDefaultLabel

Throws the following Exception:

RefNotFoundException: Ref path cannot be resolved
...
at org.springframework.cloud.config.server.resource.ResourceController.retrieve(ResourceController.java:107)

It resolves to the wrong controller endpoint:

@GetMapping("/{name}/{profile}/{label}/**")

instead of

@GetMapping(value = "/{name}/{profile}/{path:.*}", params = "useDefaultLabel")

To my understanding this should work because of this change: https://github.com/spring-cloud/spring-cloud-config/issues/824

I've tried without success:

  • Encoding the slash
  • Assigning something ("true") to the useDefaultLabel request parameter
bourne2program
  • 121
  • 1
  • 5

0 Answers0