New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wildcard config file locations from the working directory override each other #24428
Comments
Thanks for the sample. This appears to be a regression in Spring Boot 2.4.0. 2.3.5.RELEASE logs the following on startup:
Whereas 2.4.0 logs the following:
|
With trace logging enabled, we can see that both configuration files are found and imported:
They're then applied to the environment:
The problem is that both property sources have the same name and this results in them being considered equal. This in turns results in the second source that's added replacing the first. |
@mbhave @philwebb I've pushed a possible fix but I'd like so more eyes on it before merging please. |
Looks good to me. |
After some more debugging, I'm pretty much convinced that something fishy is going on so I'm taking the liberty to submit a formal issue here, since I'm not getting any relevant answer on StackOverflow.
In addition to the snippets on SO, please find attached the whole Gradle project, for your convenience.
composite-properties.zip
My environment:
$ java -version
openjdk version "15.0.1" 2020-10-20
OpenJDK Runtime Environment (build 15.0.1+9-18)
OpenJDK 64-Bit Server VM (build 15.0.1+9-18, mixed mode, sharing)
The text was updated successfully, but these errors were encountered: