Skip to content

Provide a way to further customize underlying ClientHttpRequestFactory components #39035

@ciscoo

Description

@ciscoo

I could not find a way to further modify the PoolingHttpClientConnectionManagerBuilder (or HttpClientBuilder) that Spring Boot creates without essentially duplicating Spring Boot defaults and then applying customizations.

Spring Cloud OpenFeign had properties which further customized the client. For example, to configure the pool connection policy.

Ideally, I would like to declare a customizer bean of some sort:

@FunctionalInterface
public interface PoolingHttpClientConnectionManagerBuilderCustomizer {
	
	void customize(PoolingHttpClientConnectionManagerBuilder connectionManagerBuilder);
}

Or if there were some static factory method that created a base PoolingHttpClientConnectionManagerBuilder that I could use and then further customize as needed.

Alternatively, you could provide more configuration properties like the Feign project, but I think that would quite the added overhead since they would different per HTTP client.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions