Description
This seems to have started some time in the past week, but I am not 100% sure. I am testing with by pulling down the "main", building it, installing locally, and using 4.0.0-SNAPSHOT in my local client.
In this scenario, configure one of the following ways:
- Configure one or more config server URLs under
spring.config.import
. - Or, set up
spring.config.import=configserver:
without URLs. Set one or more URLs viaspring.cloud.config.uri
.
Either of the above scenario produces same issue.
Expected: A spring-cloud-config-client will try connecting only to the configured config server URLs.
Observed: The client will try to connect to the default URL "http://localhost:8888" first.
I have attached a sample IntelliJ project that demonstrates the issue. Due to #2051, if you run this as-is, it won't produce a log file, so you can't see the log showing that it is calling localhost. To observe in the logs, update the uri(s) in the application.yml file to point to a real config server and set the application name, password, etc. so that the server will return a 200 and a log will be produced. I will also attach a sample log file.
Note that I was running with Java 17. (Ignore the name of the file in the zipped project that has "Java8".)