public class HttpClientsHelpers extends Object
Constructor and Description |
---|
HttpClientsHelpers() |
Modifier and Type | Method and Description |
---|---|
static org.springframework.web.client.RestTemplate |
getRestTemplate() |
static MicroserviceRestTemplate |
getRestTemplate(Boolean tryToReconnect,
int tryToReconnectTimes,
int sleepTimeBetweenTrying,
String microserviceName,
String pathToApiResource)
RestTemplate client can be not thread safe (depend on class implementation)
So, in secured to create a new instance to control result of each request
|
public static MicroserviceRestTemplate getRestTemplate(Boolean tryToReconnect, int tryToReconnectTimes, int sleepTimeBetweenTrying, String microserviceName, String pathToApiResource) throws URISyntaxException
URISyntaxException
public static org.springframework.web.client.RestTemplate getRestTemplate()
Copyright © 2016. All rights reserved.