Default save time for HttpConnection when using Spring Rest pattern

I am trying to find out how long the HttpConnection remains inactive before a new connection is created through the Spring vacation template. I looked at the default settings “Connection timeout” and “Timeout”, but I believe that they are used in the context of connection time, when the connection is not established due to some failure, etc.

I am looking for how long the connection is maintained if there is no activity (or) inactive, and how to configure it using the Spring Rest (or) template of the main mechanism.

+4
source share
1 answer

RestTemplate SimpleClientHttpRequestFactory, , , Java HttpURLConnection, keep-alive , , , restTemplate HttpComponentsClientHttpRequestFactory, Apache HttpClient, :

@Bean
RestTemplate restTemplate(SimpleClientHttpRequestFactory factory) {
   return new RestTemplate(factory);
}

:

HttpUrlConnection?

HttpURLConnection Java

RestTemplate ?

+5

Source: https://habr.com/ru/post/1627194/


All Articles