How to add base URI in RestTemplate : <p>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</p>

<pre><code>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)
}
</code></pre>
