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
ConfigDataLocationNotFoundException thrown at application startup with configserver: config imports, that are not even meant for the current profile #24584
Comments
What version of Spring Cloud are you using? |
Using Spring Cloud version 2020.0.0-RC1, as I did with Spring Boot 2.4.0 as well before. So the breaking change seems to be part of Spring Boot |
@dnijssen Using an old Spring Cloud version against a newer spring boot version isn't the right thing to do. This feature is tightly integrated in Spring Cloud and we had to do some changes in Edit: To make that hopefully more clear, |
Same issue occurs when running Spring Boot
|
Thanks for checking @dnijssen. I was able to reproduce this in Spring Boot. I think it's a bug that we check mandatory locations even when the profile isn't active. |
Thank you for confirming @mbhave , I have just verified the same thing as well on advice of @spencergibb. He asked me to check whether the same thing was happening when just using |
@mbhave shouldn't this be flagged a regression? |
Since upgrading from 2.4.0 to 2.4.1 (same for 2.4.2-SNAPSHOT) my application fails to startup due the following exception;
I think this is originally caused by improvements made in 3dc03ac
This occurs with the following setup; (starting up with both default profile as the local profile (-Dspring.profiles.active=local)
In my understanding this exception is thrown because all mandatory locations are checked, and not just one from the active profile. I would expect it to nicely skip the configserver: imports for both dev, test, acc, prd in the above example. Even though they are not optional, they are not meant for the active profile either.
The text was updated successfully, but these errors were encountered: