-
Notifications
You must be signed in to change notification settings - Fork 41k
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
Application fails to start when an optional config import cannot be resolved #35683
Comments
Thanks for the report, I don't think this is related to Graal and native images as the same failure occurs on the JVM. It also occurs with Spring Boot 2.7.x and Spring Cloud 2021.0.x. The problem can also be reproduced without Spring Cloud using something like |
I think the current behavior is intentional and designed to prevent misconfiguration. With or without the |
That feels like quite a subtle distinction to me as you'll get different behavior with an optional import depending on where the misconfiguration has been made. Say you have a
The difference between 2 and 3 is really subtle and whether or not the |
With options 1 and 2 we find a I guess it's possible that someone may by trying to share configuration and one app might have a I'm still not sure if we should classify this as a bug or not and which version we should target for the change. |
This issue is happening with spring boot 3.2 as well. This happens specially when applying docker-compose up command, the eureka-client is unable to detect the config server even after replacing the localhost with service name. Tried all combinations. spring.config.import = http://config-server:8088 OR |
If you think there is a bug, please open a new issue, and please attach a sample project with which we can reproduce this issue. Thanks! |
Spring Boot 3.0.6
Spring Cloud 2022.0.2
OpenJDK Runtime Environment GraalVM CE 22.3.1 (build 17.0.6+10-jvmci-22.3-b13)
I have a Spring Cloud Config setup:
when I run native image with disabled cloud config. application failed
The text was updated successfully, but these errors were encountered: