Return to site

📺 New in 🍃 #spring 6.1: #RestClient (RestTemplate successor)

· java,spring,video

New in Spring 6.1: RestClient

  • 0:00 vvauban
  • 0:11 New in Spring 6.1: RestClient
  • 0:55 video summary
  • 1:09 before: app with RestTemplate
  • 2:45 after: app with RestClient
  • 6:02 article check
  • 6:57 conlusion: no more required spring-boot-starter-webflux dependency + Loom friendly
  • 8:13 thx
  • 8:17 udemy course

RestClient is a new synchronous HTTP client that was introduced in Spring Framework 6.1. It offers the fluent API of WebClient with the infrastructure of RestTemplate.

It is designed to replace the old RestTemplate, which is in maintenance mode since Spring 5.

RestClient allows you to perform HTTP requests with a simple and expressive syntax, similar to WebClient, but without the need for reactive programming.

Code sample: