Class RestTemplateBuilder

java.lang.Object
org.springframework.boot.web.client.RestTemplateBuilder

public class RestTemplateBuilder extends Object
Builder that can be used to configure and create a RestTemplate. Provides convenience methods to register converters, error handlers and UriTemplateHandlers.

By default the built RestTemplate will attempt to use the most suitable ClientHttpRequestFactory, call detectRequestFactory(false) if you prefer to keep the default. In a typical auto-configured Spring Boot application this builder is available as a bean and can be injected whenever a RestTemplate is needed.

Since:
1.4.0
Author:
Stephane Nicoll, Phillip Webb, Andy Wilkinson, Brian Clozel, Dmytro Nosan, Kevin Strijbos, Ilya Lukyanovich