Skip to content

Create Registry for HTTP Interface Proxies with Extensible Registration DSL #33992

Closed
1 of 1 issue completed
@rstoyanchev

Description

@rstoyanchev

HttpServiceProxyFactory makes it easy to create a proxy for an HTTP interface. However, it's clear from feedback under spring-projects/spring-boot#31337 that more needs to be done to help with creating 10's, maybe 100's of HTTP service proxies, associating each with a suitably configured HTTP client, and exposing beans for injection. See for example httpexchange-spring-boot-starter and configuration example or this alternative spring addon that have been created to provide capabilities comparable to what's available in Spring Cloud OpenFeign.

To help with all this, we can create a registry for HTTP Service proxies that exposes a DSL to describe HTTP client configuration sets and the HTTP services to associate each with. It can start with a single RestClient.Builder or WebClient.Builder instance, e.g. like the one provided by Spring Boot autoconfig. It can configure that with common properties for all proxies, and further clone it to make customizations as required for each client config set. The registry would then allow access fully initialized HTTP service proxies by type, and/or possibly further qualified by name.

The DSL needs to provide a mechanism for 3rd parties to extend the DSL that Spring Cloud could use to add load balancing and other features.

Sub-issues

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions