You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "raffig (via GitHub)" <gi...@apache.org> on 2024/01/03 14:16:50 UTC

[I] Needless spring-cloud-starter-bootstrap dependency in module log4j-spring-cloud-config-client (logging-log4j2)

raffig opened a new issue, #2157:
URL: https://github.com/apache/logging-log4j2/issues/2157

   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:
   
   https://github.com/spring-cloud/spring-cloud-config/issues/2052
   
   Current solution is to exclude this dependency:
   
   ```xml
           <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
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Needless spring-cloud-starter-bootstrap dependency in module log4j-spring-cloud-config-client (logging-log4j2)

Posted by "ppkarwasz (via GitHub)" <gi...@apache.org>.
ppkarwasz closed issue #2157: Needless spring-cloud-starter-bootstrap dependency in module log4j-spring-cloud-config-client
URL: https://github.com/apache/logging-log4j2/issues/2157


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Needless spring-cloud-starter-bootstrap dependency in module log4j-spring-cloud-config-client (logging-log4j2)

Posted by "ppkarwasz (via GitHub)" <gi...@apache.org>.
ppkarwasz commented on issue #2157:
URL: https://github.com/apache/logging-log4j2/issues/2157#issuecomment-1877600108

   @raffig,
   
   Thank you for the report. I reviewed the dependencies of `log4j-spring-cloud-config-client` to only include those required: `spring-context` and `spring-cloud-context`. Can you take a look at #2166?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org