Description
Module log4j-spring-cloud-config-client
has dependency to spring-cloud-starter-bootstrap
which in general provides support for legacy bootstrap way of connecting to Config Server:
https://docs.spring.io/spring-cloud-config/docs/current/reference/html/#config-first-bootstrap
I haven't made any research on this but at first sight it seems that this dependency is needless or at least should be an optional.
Side effect of this dependency as compile scoped is that application with dependency to log4j-spring-cloud-config-client
always tries to connect to http://localhost:8888
at startup and then to the actually configured url with property spring.config.import
as described in:
spring-cloud/spring-cloud-config#2052
Current solution is to exclude this dependency:
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-spring-cloud-config-client</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
</exclusion>
</exclusions>
</dependency>
However maybe it would be possible to remove this dependency at all or at least change it to optional if some features requires it.
I have checked this with Spring Boot 3.2.1
and latest available Spring Cloud 2023.0.0
which resulted with log4j-spring-cloud-config-client
version 2.19.0
, however even the latest 2.22.1
has this dependency:
https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-spring-cloud-config-client/2.22.1