Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rstoyanchev opened this issue Nov 29, 2024 · 0 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@rstoyanchev
Copy link
Contributor

rstoyanchev commented Nov 29, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant