Is there any other way to initialize RestTemplate with base URI other than extending RestTemplate and overriding the execute method.currently i have the code like below.Thanks
class CustomRestTemplate extends RestTemplate {
String baseUrl
@Override
protected T doExecute(URI url, HttpMethod method, RequestCallback requestCallback, ResponseExtractor responseExtractor) throws RestClientException {
return super.doExecute(new URI(baseUrl + url.toString()), method, requestCallback, responseExtractor)
}