Create Registry for HTTP Interface Proxies with Extensible Registration DSL #33992
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
Milestone
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
orWebClient.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.
The text was updated successfully, but these errors were encountered: