Class RestTemplateBuilder

java.lang.Object
org.springframework.boot.restclient.RestTemplateBuilder

@Deprecated(since="4.2.0", forRemoval=true) public class RestTemplateBuilder extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
since 4.2.0 for removal in 4.4.0 in favor of RestClient.Builder
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:
4.0.0
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Create a new RestTemplateBuilder instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Add RestTemplateCustomizers that should be applied to the RestTemplate.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Add RestTemplateCustomizers that should be applied to the RestTemplate.
    additionalInterceptors(Collection<? extends org.springframework.http.client.ClientHttpRequestInterceptor> interceptors)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Add additional ClientHttpRequestInterceptors that should be used with the RestTemplate.
    additionalInterceptors(org.springframework.http.client.ClientHttpRequestInterceptor... interceptors)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Add additional ClientHttpRequestInterceptors that should be used with the RestTemplate.
    additionalMessageConverters(Collection<? extends org.springframework.http.converter.HttpMessageConverter<?>> messageConverters)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Add additional HttpMessageConverters that should be used with the RestTemplate.
    additionalMessageConverters(org.springframework.http.converter.HttpMessageConverter<?>... messageConverters)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Add additional HttpMessageConverters that should be used with the RestTemplate.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Add the RestTemplateRequestCustomizers that should be applied to the ClientHttpRequest.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Add the RestTemplateRequestCustomizers that should be applied to the ClientHttpRequest.
    baseUri(String baseUri)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set a base URL template that should be applied to each request that starts with '/'.
    basicAuthentication(String username, String password)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Add HTTP Basic Authentication to requests with the given username/password pair, unless a custom Authorization header has been set before.
    basicAuthentication(String username, String password, @Nullable Charset charset)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Add HTTP Basic Authentication to requests with the given username/password pair, unless a custom Authorization header has been set before.
    org.springframework.web.client.RestTemplate
    Deprecated, for removal: This API element is subject to removal in a future version.
    Build a new RestTemplate instance and configure it using this builder.
    <T extends org.springframework.web.client.RestTemplate>
    T
    build(Class<T> restTemplateClass)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Build a new RestTemplate instance of the specified type and configure it using this builder.
    @Nullable org.springframework.http.client.ClientHttpRequestFactory
    Deprecated, for removal: This API element is subject to removal in a future version.
    Build a new ClientHttpRequestFactory instance using the settings of this builder.
    clientSettings(UnaryOperator<org.springframework.boot.http.client.HttpClientSettings> clientSettingsCustomizer)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Update the HttpClientSettings using the given customizer.
    clientSettings(org.springframework.boot.http.client.HttpClientSettings clientSettings)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the HttpClientSettings.
    <T extends org.springframework.web.client.RestTemplate>
    T
    configure(T restTemplate)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Configure the provided RestTemplate instance using this builder.
    connectTimeout(Duration connectTimeout)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the connection timeout on the underlying ClientHttpRequestFactory.
    cookieHandling(org.springframework.boot.http.client.HttpCookieHandling cookieHandling)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the cookie handling strategy on the underlying ClientHttpRequestFactory.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set the RestTemplateCustomizers that should be applied to the RestTemplate.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set the RestTemplateCustomizers that should be applied to the RestTemplate.
    defaultHeader(String name, String... values)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Add a default header that will be set if not already present on the outgoing ClientHttpRequest.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set the HttpMessageConverters that should be used with the RestTemplate to the default set.
    detectRequestFactory(boolean detectRequestFactory)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set if the ClientHttpRequestFactory should be detected based on the classpath.
    errorHandler(org.springframework.web.client.ResponseErrorHandler errorHandler)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set the ResponseErrorHandler that should be used with the RestTemplate.
    interceptors(Collection<org.springframework.http.client.ClientHttpRequestInterceptor> interceptors)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set the ClientHttpRequestInterceptors that should be used with the RestTemplate.
    interceptors(org.springframework.http.client.ClientHttpRequestInterceptor... interceptors)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set the ClientHttpRequestInterceptors that should be used with the RestTemplate.
    messageConverters(Iterable<? extends org.springframework.http.converter.HttpMessageConverter<?>> messageConverters)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set the HttpMessageConverters that should be used with the RestTemplate.
    messageConverters(org.springframework.http.converter.HttpMessageConverter<?>... messageConverters)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set the HttpMessageConverters that should be used with the RestTemplate.
    readTimeout(Duration readTimeout)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the read timeout on the underlying ClientHttpRequestFactory.
    redirects(org.springframework.boot.http.client.HttpRedirects redirects)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the redirect strategy on the underlying ClientHttpRequestFactory.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set the RestTemplateRequestCustomizers that should be applied to the ClientHttpRequest.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set the RestTemplateRequestCustomizers that should be applied to the ClientHttpRequest.
    requestFactory(Class<? extends org.springframework.http.client.ClientHttpRequestFactory> requestFactoryType)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set the ClientHttpRequestFactory class that should be used with the RestTemplate.
    requestFactory(Supplier<org.springframework.http.client.ClientHttpRequestFactory> requestFactorySupplier)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set the Supplier of ClientHttpRequestFactory that should be called each time we build() a new RestTemplate instance.
    @Nullable org.springframework.boot.http.client.ClientHttpRequestFactoryBuilder<?>
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return a ClientHttpRequestFactoryBuilder instance using the settings of this builder.
    requestFactoryBuilder(org.springframework.boot.http.client.ClientHttpRequestFactoryBuilder<?> requestFactoryBuilder)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set the ClientHttpRequestFactoryBuilder that should be used each time we build() a new RestTemplate instance.
    rootUri(@Nullable String rootUri)
    Deprecated, for removal: This API element is subject to removal in a future version.
    since 4.1.0 for removal in 4.3.0 in favor of baseUri(String)
    sslBundle(org.springframework.boot.ssl.SslBundle sslBundle)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the SSL bundle on the underlying ClientHttpRequestFactory.
    uriTemplateHandler(org.springframework.web.util.UriTemplateHandler uriTemplateHandler)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set the UriTemplateHandler that should be used with the RestTemplate.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RestTemplateBuilder

      public RestTemplateBuilder(RestTemplateCustomizer... customizers)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create a new RestTemplateBuilder instance.
      Parameters:
      customizers - any RestTemplateCustomizers that should be applied when the RestTemplate is built
  • Method Details

    • baseUri

      public RestTemplateBuilder baseUri(String baseUri)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set a base URL template that should be applied to each request that starts with '/'. The base URL will only apply when String variants of the RestTemplate methods are used for specifying the request URL.

      This is a specialization of uriTemplateHandler(UriTemplateHandler) and will override any previously configured uri template handler.

      Parameters:
      baseUri - the base URI
      Returns:
      a new builder instance
      Since:
      4.1.0
    • detectRequestFactory

      public RestTemplateBuilder detectRequestFactory(boolean detectRequestFactory)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set if the ClientHttpRequestFactory should be detected based on the classpath. Default if true.
      Parameters:
      detectRequestFactory - if the ClientHttpRequestFactory should be detected
      Returns:
      a new builder instance
    • rootUri

      @Deprecated(forRemoval=true, since="4.1.0") public RestTemplateBuilder rootUri(@Nullable String rootUri)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 4.1.0 for removal in 4.3.0 in favor of baseUri(String)
      Set a root URL that should be applied to each request that starts with '/'. The root URL will only apply when String variants of the RestTemplate methods are used for specifying the request URL.
      Parameters:
      rootUri - the root URI or null
      Returns:
      a new builder instance
    • messageConverters

      public RestTemplateBuilder messageConverters(org.springframework.http.converter.HttpMessageConverter<?>... messageConverters)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the HttpMessageConverters that should be used with the RestTemplate. Setting this value will replace any previously configured converters and any converters configured on the builder will replace RestTemplate's default converters.
      Parameters:
      messageConverters - the converters to set
      Returns:
      a new builder instance
      See Also:
    • messageConverters

      public RestTemplateBuilder messageConverters(Iterable<? extends org.springframework.http.converter.HttpMessageConverter<?>> messageConverters)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the HttpMessageConverters that should be used with the RestTemplate. Setting this value will replace any previously configured converters and any converters configured on the builder will replace RestTemplate's default converters.
      Parameters:
      messageConverters - the converters to set
      Returns:
      a new builder instance
      See Also:
    • additionalMessageConverters

      public RestTemplateBuilder additionalMessageConverters(org.springframework.http.converter.HttpMessageConverter<?>... messageConverters)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Add additional HttpMessageConverters that should be used with the RestTemplate. Any converters configured on the builder will replace RestTemplate's default converters.
      Parameters:
      messageConverters - the converters to add
      Returns:
      a new builder instance
      See Also:
    • additionalMessageConverters

      public RestTemplateBuilder additionalMessageConverters(Collection<? extends org.springframework.http.converter.HttpMessageConverter<?>> messageConverters)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Add additional HttpMessageConverters that should be used with the RestTemplate. Any converters configured on the builder will replace RestTemplate's default converters.
      Parameters:
      messageConverters - the converters to add
      Returns:
      a new builder instance
      See Also:
    • defaultMessageConverters

      public RestTemplateBuilder defaultMessageConverters()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the HttpMessageConverters that should be used with the RestTemplate to the default set. Calling this method will replace any previously defined converters.
      Returns:
      a new builder instance
      See Also:
    • interceptors

      public RestTemplateBuilder interceptors(org.springframework.http.client.ClientHttpRequestInterceptor... interceptors)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the ClientHttpRequestInterceptors that should be used with the RestTemplate. Setting this value will replace any previously defined interceptors.
      Parameters:
      interceptors - the interceptors to set
      Returns:
      a new builder instance
      See Also:
    • interceptors

      public RestTemplateBuilder interceptors(Collection<org.springframework.http.client.ClientHttpRequestInterceptor> interceptors)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the ClientHttpRequestInterceptors that should be used with the RestTemplate. Setting this value will replace any previously defined interceptors.
      Parameters:
      interceptors - the interceptors to set
      Returns:
      a new builder instance
      See Also:
    • additionalInterceptors

      public RestTemplateBuilder additionalInterceptors(org.springframework.http.client.ClientHttpRequestInterceptor... interceptors)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Add additional ClientHttpRequestInterceptors that should be used with the RestTemplate.
      Parameters:
      interceptors - the interceptors to add
      Returns:
      a new builder instance
      See Also:
    • additionalInterceptors

      public RestTemplateBuilder additionalInterceptors(Collection<? extends org.springframework.http.client.ClientHttpRequestInterceptor> interceptors)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Add additional ClientHttpRequestInterceptors that should be used with the RestTemplate.
      Parameters:
      interceptors - the interceptors to add
      Returns:
      a new builder instance
      See Also:
    • requestFactory

      public RestTemplateBuilder requestFactory(Class<? extends org.springframework.http.client.ClientHttpRequestFactory> requestFactoryType)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the ClientHttpRequestFactory class that should be used with the RestTemplate.
      Parameters:
      requestFactoryType - the request factory type to use
      Returns:
      a new builder instance
      See Also:
    • requestFactory

      public RestTemplateBuilder requestFactory(Supplier<org.springframework.http.client.ClientHttpRequestFactory> requestFactorySupplier)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the Supplier of ClientHttpRequestFactory that should be called each time we build() a new RestTemplate instance.
      Parameters:
      requestFactorySupplier - the supplier for the request factory
      Returns:
      a new builder instance
      See Also:
    • requestFactoryBuilder

      public RestTemplateBuilder requestFactoryBuilder(org.springframework.boot.http.client.ClientHttpRequestFactoryBuilder<?> requestFactoryBuilder)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the ClientHttpRequestFactoryBuilder that should be used each time we build() a new RestTemplate instance.
      Parameters:
      requestFactoryBuilder - the ClientHttpRequestFactoryBuilder to use
      Returns:
      a new builder instance
      See Also:
      • ClientHttpRequestFactoryBuilder
    • uriTemplateHandler

      public RestTemplateBuilder uriTemplateHandler(org.springframework.web.util.UriTemplateHandler uriTemplateHandler)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the UriTemplateHandler that should be used with the RestTemplate.

      This method will override any baseUri(String) previously set.

      Parameters:
      uriTemplateHandler - the URI template handler to use
      Returns:
      a new builder instance
    • errorHandler

      public RestTemplateBuilder errorHandler(org.springframework.web.client.ResponseErrorHandler errorHandler)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the ResponseErrorHandler that should be used with the RestTemplate.
      Parameters:
      errorHandler - the error handler to use
      Returns:
      a new builder instance
    • basicAuthentication

      public RestTemplateBuilder basicAuthentication(String username, String password)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Add HTTP Basic Authentication to requests with the given username/password pair, unless a custom Authorization header has been set before.
      Parameters:
      username - the user name
      password - the password
      Returns:
      a new builder instance
      See Also:
    • basicAuthentication

      public RestTemplateBuilder basicAuthentication(String username, String password, @Nullable Charset charset)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Add HTTP Basic Authentication to requests with the given username/password pair, unless a custom Authorization header has been set before.
      Parameters:
      username - the user name
      password - the password
      charset - the charset to use
      Returns:
      a new builder instance
    • defaultHeader

      public RestTemplateBuilder defaultHeader(String name, String... values)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Add a default header that will be set if not already present on the outgoing ClientHttpRequest.
      Parameters:
      name - the name of the header
      values - the header values
      Returns:
      a new builder instance
    • clientSettings

      public RestTemplateBuilder clientSettings(org.springframework.boot.http.client.HttpClientSettings clientSettings)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the HttpClientSettings. This will replace any previously set connectTimeout, readTimeout and sslBundle values.
      Parameters:
      clientSettings - the client settings
      Returns:
      a new builder instance
    • clientSettings

      public RestTemplateBuilder clientSettings(UnaryOperator<org.springframework.boot.http.client.HttpClientSettings> clientSettingsCustomizer)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Update the HttpClientSettings using the given customizer.
      Parameters:
      clientSettingsCustomizer - a UnaryOperator to update client factory settings
      Returns:
      a new builder instance
    • connectTimeout

      public RestTemplateBuilder connectTimeout(Duration connectTimeout)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the connection timeout on the underlying ClientHttpRequestFactory.
      Parameters:
      connectTimeout - the connection timeout
      Returns:
      a new builder instance.
    • readTimeout

      public RestTemplateBuilder readTimeout(Duration readTimeout)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the read timeout on the underlying ClientHttpRequestFactory.
      Parameters:
      readTimeout - the read timeout
      Returns:
      a new builder instance.
    • cookieHandling

      public RestTemplateBuilder cookieHandling(org.springframework.boot.http.client.HttpCookieHandling cookieHandling)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the cookie handling strategy on the underlying ClientHttpRequestFactory.
      Parameters:
      cookieHandling - the cookie handling strategy
      Returns:
      a new builder instance.
      Since:
      4.1.0
    • redirects

      public RestTemplateBuilder redirects(org.springframework.boot.http.client.HttpRedirects redirects)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the redirect strategy on the underlying ClientHttpRequestFactory.
      Parameters:
      redirects - the redirect strategy
      Returns:
      a new builder instance.
    • sslBundle

      public RestTemplateBuilder sslBundle(org.springframework.boot.ssl.SslBundle sslBundle)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the SSL bundle on the underlying ClientHttpRequestFactory.
      Parameters:
      sslBundle - the SSL bundle
      Returns:
      a new builder instance
    • customizers

      public RestTemplateBuilder customizers(RestTemplateCustomizer... customizers)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the RestTemplateCustomizers that should be applied to the RestTemplate. Customizers are applied in the order that they were added after builder configuration has been applied. Setting this value will replace any previously configured customizers.
      Parameters:
      customizers - the customizers to set
      Returns:
      a new builder instance
      See Also:
    • customizers

      public RestTemplateBuilder customizers(Collection<? extends RestTemplateCustomizer> customizers)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the RestTemplateCustomizers that should be applied to the RestTemplate. Customizers are applied in the order that they were added after builder configuration has been applied. Setting this value will replace any previously configured customizers.
      Parameters:
      customizers - the customizers to set
      Returns:
      a new builder instance
      See Also:
    • additionalCustomizers

      public RestTemplateBuilder additionalCustomizers(RestTemplateCustomizer... customizers)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Add RestTemplateCustomizers that should be applied to the RestTemplate. Customizers are applied in the order that they were added after builder configuration has been applied.
      Parameters:
      customizers - the customizers to add
      Returns:
      a new builder instance
      See Also:
    • additionalCustomizers

      public RestTemplateBuilder additionalCustomizers(Collection<? extends RestTemplateCustomizer> customizers)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Add RestTemplateCustomizers that should be applied to the RestTemplate. Customizers are applied in the order that they were added after builder configuration has been applied.
      Parameters:
      customizers - the customizers to add
      Returns:
      a new builder instance
      See Also:
    • requestCustomizers

      public RestTemplateBuilder requestCustomizers(RestTemplateRequestCustomizer<?>... requestCustomizers)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the RestTemplateRequestCustomizers that should be applied to the ClientHttpRequest. Customizers are applied in the order that they were added. Setting this value will replace any previously configured request customizers.
      Parameters:
      requestCustomizers - the request customizers to set
      Returns:
      a new builder instance
      See Also:
    • requestCustomizers

      public RestTemplateBuilder requestCustomizers(Collection<? extends RestTemplateRequestCustomizer<?>> requestCustomizers)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the RestTemplateRequestCustomizers that should be applied to the ClientHttpRequest. Customizers are applied in the order that they were added. Setting this value will replace any previously configured request customizers.
      Parameters:
      requestCustomizers - the request customizers to set
      Returns:
      a new builder instance
      See Also:
    • additionalRequestCustomizers

      public RestTemplateBuilder additionalRequestCustomizers(RestTemplateRequestCustomizer<?>... requestCustomizers)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Add the RestTemplateRequestCustomizers that should be applied to the ClientHttpRequest. Customizers are applied in the order that they were added.
      Parameters:
      requestCustomizers - the request customizers to add
      Returns:
      a new builder instance
      See Also:
    • additionalRequestCustomizers

      public RestTemplateBuilder additionalRequestCustomizers(Collection<? extends RestTemplateRequestCustomizer<?>> requestCustomizers)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Add the RestTemplateRequestCustomizers that should be applied to the ClientHttpRequest. Customizers are applied in the order that they were added.
      Parameters:
      requestCustomizers - the request customizers to add
      Returns:
      a new builder instance
      See Also:
    • build

      public org.springframework.web.client.RestTemplate build()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Build a new RestTemplate instance and configure it using this builder.
      Returns:
      a configured RestTemplate instance.
      See Also:
    • build

      public <T extends org.springframework.web.client.RestTemplate> T build(Class<T> restTemplateClass)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Build a new RestTemplate instance of the specified type and configure it using this builder.
      Type Parameters:
      T - the type of rest template
      Parameters:
      restTemplateClass - the template type to create
      Returns:
      a configured RestTemplate instance.
      See Also:
    • configure

      public <T extends org.springframework.web.client.RestTemplate> T configure(T restTemplate)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Configure the provided RestTemplate instance using this builder.
      Type Parameters:
      T - the type of rest template
      Parameters:
      restTemplate - the RestTemplate to configure
      Returns:
      the rest template instance
      See Also:
    • buildRequestFactory

      public @Nullable org.springframework.http.client.ClientHttpRequestFactory buildRequestFactory()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Build a new ClientHttpRequestFactory instance using the settings of this builder.
      Returns:
      a ClientHttpRequestFactory or null
    • requestFactoryBuilder

      public @Nullable org.springframework.boot.http.client.ClientHttpRequestFactoryBuilder<?> requestFactoryBuilder()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return a ClientHttpRequestFactoryBuilder instance using the settings of this builder.
      Returns:
      a ClientHttpRequestFactoryBuilder or null