Skip to content

Remove Apache HttpClient 4 dependency #1581

@clutcher

Description

@clutcher

As I see org.apache.httpcomponents:httpclient:4.5.3 is needed only for 3 classes - MonitoredConnectionManager, NamedConnectionPool and SSLSocketFactoryAdapter, which are not used anywhere else in the code. Also from what I see in implementation and current state of spring cloud netflix - it looks like eureka-client is now uses everywhere EurekaHttpClient interface and doesn't not need to provide http client implementation itself.

Is it ok if I would raise PR to remove this 3 classes and dependency on httpclient 4? Or I'm missing something and this classes are used somewhere and should be migrated to apache http client 5?

P.S. I'm raising this bug, because time to time I get issue with not working service discovery in Spring Boot/Cloud microservices implementation. Investigation usually shows that including of httpclient4 dependency leads to creating an additional spring bean for http client 4 without full configuration, what leads to not working service discovery clients. To fix this issue is usually enough to explicitly disable dependency on http client 4, as it usually comes with eureka-client dependency, while all other dependency and app implementation already uses http client 5.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions