Introduce a starter for HTTP Client applications #42715
Labels
status: blocked
An issue that's blocked on an external project change
theme: structure
Issues related to the structure of the project and its code
type: enhancement
A general enhancement
Milestone
I'd like to suggest introducing a new Spring Boot starter aimed at client applications, with the necessary dependencies and autoconfiguration (e.g.
RestClientAutoConfiguration
) for HTTP and for related slice tests. Perhaps, two starters for imperative and reactive scenarios:spring-boot-http-client-starter
andspring-boot-http-client-reactive-starter
, or something like that.In the past few years, building CLI applications with Java has become more and more common, also thanks to projects like GraalVM and Spring Shell. Reducing the friction for bootstrapping a CLI project that needs HTTP interactions would greatly help increase the adoption of the Spring stack for this purpose.
Most recently, Spring AI brought new use cases for CLI applications, which would need an HTTP client infrastructure without the burden of an entire web server stack.
Besides the CLI use case, introducing such a starter would help imperative applications that need a WebClient (required by Spring AI for streaming scenarios, because RestClient doesn't support streaming) include just client dependencies instead of the entire server stack.
Whether it is possible to set the
spring.main.web-application-type=none
property for disabling the web server part of the autoconfigured stack, the developer experience could be improved. Also, including several additional server dependencies which are not used is not ideal, especially from a maintenance and supply chain management point of view.It would be great to be able to bootstrap a client-only application from Spring Initializr. I'm available to help with the implementation, if you think this is something that makes sense for the project.
Related issues on Spring Boot:
Related issues on Spring AI:
Related issues on Spring Pet Clinic:
The text was updated successfully, but these errors were encountered: