I have a struts based application in which I am calling my Restful Web Service. My actual service invocation looks like below:
RestTemplate restTemplate = new RestTemplate();
ResponseEntity<String> response = restTemplate.exchange(testUrl, httpMethod, entity, String.class);
Call go through just fine but I want to handle the scenario if in case my service is down I want to timeout in like 1 minute instead of waiting for so long.