useDefaultLabel not working to get resources
Describe the bug
In org.springframework.cloud.config.server.resource.ResourceController there are some methods that use a parameter useDefaultLabel to differentiate from the others.
This is not working, when running /name/profile/some/file?useDefaultLabel the request is handled by the wrong method, the one that receives a label, and takes some as the label
Can you be more specific about which method you believe should be handling that request and which one is actually handling the request? Can you provide a sample?
Sure, specifically its being handled by
@GetMapping("/{name}/{profile}/{label}/**")
public String retrieve(@PathVariable String name, @PathVariable String profile, @PathVariable String label,
ServletWebRequest request, @RequestParam(defaultValue = "true") boolean resolvePlaceholders)
throws IOException {
String path = getFilePath(request, name, profile, label);
return retrieve(request, name, profile, label, path, resolvePlaceholders);
}
But it should be handled by
@GetMapping(value = "/{name}/{profile}/{path:.*}", params = "useDefaultLabel")
public String retrieveDefault(@PathVariable String name, @PathVariable String profile, @PathVariable String path,
ServletWebRequest request, @RequestParam(defaultValue = "true") boolean resolvePlaceholders)
throws IOException {
return retrieve(request, name, profile, null, path, resolvePlaceholders);
}
See, the objective is to hit the endpoint that uses the default label configured in the config server
Maybe I am missing something, but what class are these methods in?
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.