This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Framework 7.0.6!spring-doc.cn

REST Clients

This section describes options for client-side access to REST endpoints.spring-doc.cn

RestClient

RestClient is a synchronous HTTP client that exposes a modern, fluent API.spring-doc.cn

See RestClient for more details.spring-doc.cn

WebClient

WebClient is a reactive client for making HTTP requests with a fluent API.spring-doc.cn

See WebClient for more details.spring-doc.cn

RestTemplate

RestTemplate is a synchronous client for making HTTP requests. It is the original Spring REST client and exposes a simple, template-method API over underlying HTTP client libraries.spring-doc.cn

See RestTemplate for details.spring-doc.cn

HTTP Service Client

The Spring Framework lets you define an HTTP service as a Java interface with HTTP exchange methods. You can then generate a proxy that implements this interface and performs the exchanges. This helps to simplify HTTP remote access and provides additional flexibility for choosing an API style such as synchronous or reactive.spring-doc.cn