Describe the bug I'm using a composite repository with two git repositories. When loading properties using the environment abstraction, the order of the repositories is resolved correctly, but when loading plain text resource, the order is incorrect (the resource from the repository with a lower priority / higher order is loaded).
The order seems to be reversed when locations are looped: https://github.com/spring-cloud/spring-cloud-config/blob/master/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/resource/GenericResourceRepository.java#L58
spring-cloud-config-server
in version 3.0.2
is used.
Sample Configuration Service application.yaml
server:
port: 8888
spring:
profiles:
active: composite
cloud:
config:
server:
composite:
- type: git
uri: C:/GIT/conf-user-set/
searchPaths: '*/*'
force-pull: true
- type: git
uri: C:/GIT/conf/
searchPaths: '*/*'
force-pull: true
bootstrap: true
Local git repository files:
c:\GIT\conf\manta-admin-gui\default\configuration_instances.json
c:\GIT\conf-user-set\manta-admin-gui\default\configuration_instances.json
Get request:
http://localhost:8888/manta-admin-gui/default/master/configuration_instances.json
Result:
c:\GIT\conf\manta-admin-gui\default\configuration_instances.json
is loaded despite the fact that the repository C:/GIT/conf-user-set/
is first in the list of the composite repository children.
Comment From: jakub-moravec
Hi @ryanjbaxter and @spencergibb, thank you for the fix!
Comment From: jakub-moravec
@ryanjbaxter what 3.0.*
version of spring-cloud-config-server
will I need to get the fix? It's not included in 3.0.3, right?
Comment From: spencergibb
it will be in 3.0.4