ResourceController has multiple @RequestMappings that would conflict, currently to avoid passing the label we use the useDefaultLabel request parameter to select. Starting with spring 5.3 this is no longer happening.
Given
@RequestMapping("/{name}/{profile}/{label}/**")
// and
@RequestMapping(value = "/{name}/{profile}/**", params = "useDefaultLabel")
Calling /foo/default/file.txt?useDefaultLabel used to route to the later, now it routes to the former and produces an error because the file is treated as a label.
Comment From: spencergibb
After writing some samples, it appears that using the useDefaultLabel request parameter to select a different @RequestMapping hasn't worked for some time. It appears that no one is using this as no one is reporting problems. This method will get removed instead.
Comment From: dinhani
I was starting to use the the ResourceController for serving plain-text files, but it did not work. Is the support for plain-text files being removed or just migrated to something else?
Comment From: spencergibb
@dinhani no, this is to remove specific use of a query parameter named useDefaultLabel that doesn't work anyway.
Comment From: ThomasVitale
@spencergibb can I help with this task?
Comment From: spencergibb
@ThomasVitale sure
Comment From: ThomasVitale
@spencergibb I've just created a PR: https://github.com/spring-cloud/spring-cloud-config/pull/1728
I've removed both mappings in ResourceController using the useDefaultLabel. Is it ok?