spring-cloud / spring-cloud-config

External configuration (server and client) for Spring Cloud
Apache License 2.0
1.96k stars 1.29k forks source link

Configurations are not combined as expected #1404

Closed Manny404 closed 5 years ago

Manny404 commented 5 years ago

We have 2 Microservies one is called Applications the other Location. If I now create an application-dev.yml and an applications-dev.yml the Applications Service gets only the content of the applications-dev.yml. The Location Service gets the data from its location-dev.yml and the application-dev.yml.

My expectation is that the Applications Service gets the values from both files like the Location Service.

This behavior occurs when configuring from files as well as from a GIT repository.

Using Jhipster Registry 4.1.1/5.0.0 contains Spring Boot 2.1.4-RELEASE

central-config.zip

ryanjbaxter commented 5 years ago

Can you provide a complete, minimal, verifiable sample that reproduces the problem? It should be available as a GitHub (or similar) project or attached to this issue as a zip file. Also please remove the JHipster dependencies in your sample so you are only using Spring Cloud.

Manny404 commented 5 years ago

Simple Cloudconfig Server as possible: https://github.com/Manny404/demoCloudConfig

The Config files are in the https://github.com/Manny404/demoConfigFiles repo. Start the ConfigServer and get the following configurations: http://localhost:8888/application/dev result in "basicconf":"basic"

http://localhost:8888/applications/dev results in "test":"test" basic config ist missing

http://localhost:8888/location/dev results in "basicconf":"basic" AND "test":"location"

My expectation is that the basic config and the config from the applications file will also come back when I retrieve applications. As for the locationservice

I omitted a client implementation because the problem is already visible in the browser.

spencergibb commented 5 years ago

There may be an edge case, but naming something applications as an application name is wonky.

ryanjbaxter commented 5 years ago

If you rename applications to something else does it work as expected?

Manny404 commented 5 years ago

Ja mit den location Service tritt das Problem nicht auf. Ich habe auch noch 8 andere Services die das Problem nicht haben, die ich aber der Übersicht wegen weggelassen habe.

ryanjbaxter commented 5 years ago

Sorry could you translate that to English please?

Manny404 commented 5 years ago

Yes, with the location service the problem does not occur. I also have 8 other services that don't have the problem, but I omitted them for the sake of clarity.

ryanjbaxter commented 5 years ago

So it sounds like naming an application applications is not acceptable. Our suggestion then is to rename the application to something else.

spring-projects-issues commented 5 years ago

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.

spring-projects-issues commented 5 years ago

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.