@Test public void get() throws URISyntaxException { URI uri = new URI(baseUrl + "/demo/1"); Demo demo = RestUtils.get(uri, Demo.class); Assert.assertNotNull(demo); }
public static <T> T get(URI url, Class<T> responseType) { Assert.notNull(url); Assert.notNull(responseType); return restTemplate.getForObject(url, responseType); }
RestUtils { public static <T> T get(URI url, Class<T> responseType) { Assert.notNull(url); Assert.notNull(responseType); return restTemplate.getForObject(url, responseType); } }
RestUtils { public static <T> T get(URI url, Class<T> responseType) { Assert.notNull(url); Assert.notNull(responseType); return restTemplate.getForObject(url, responseType); }  }
RestUtils { public static <T> T get(URI url, Class<T> responseType) { Assert.notNull(url); Assert.notNull(responseType); return restTemplate.getForObject(url, responseType); }  static void setRestTemplate(RestTemplate restTemplate); static T get(URI url, Class<T> responseType); static T get(String url, Class<T> responseType, Object... uriVariables); static T get(String url, Class<T> responseType); static T get(String url, Class<T> responseType, Map<String, ?> urlVariables); static T post(URI url, Object request, Class<T> responseType); static T post(String url, Object request, Class<T> responseType, Object... uriVariables); static T post(String url, Object request, Class<T> responseType); static T post(String url, Object request, Class<T> responseType, Map<String, ?> urlVariables); static HttpHeaders head(String url, Object... urlVariables); static HttpHeaders head(String url, Map<String, ?> urlVariables); static HttpHeaders head(URI url); static void put(String url, Object request, Object... urlVariables); static void put(String url, Object request, Map<String, ?> urlVariables); static void put(URI url, Object request); static void delete(String url, Object... urlVariables); static void delete(String url, Map<String, ?> urlVariables); static void delete(URI url); static Set<HttpMethod> options(String url, Object... urlVariables); static Set<HttpMethod> options(String url, Map<String, ?> urlVariables); static Set<HttpMethod> options(URI url); }
RestUtils { public static <T> T get(URI url, Class<T> responseType) { Assert.notNull(url); Assert.notNull(responseType); return restTemplate.getForObject(url, responseType); }  static void setRestTemplate(RestTemplate restTemplate); static T get(URI url, Class<T> responseType); static T get(String url, Class<T> responseType, Object... uriVariables); static T get(String url, Class<T> responseType); static T get(String url, Class<T> responseType, Map<String, ?> urlVariables); static T post(URI url, Object request, Class<T> responseType); static T post(String url, Object request, Class<T> responseType, Object... uriVariables); static T post(String url, Object request, Class<T> responseType); static T post(String url, Object request, Class<T> responseType, Map<String, ?> urlVariables); static HttpHeaders head(String url, Object... urlVariables); static HttpHeaders head(String url, Map<String, ?> urlVariables); static HttpHeaders head(URI url); static void put(String url, Object request, Object... urlVariables); static void put(String url, Object request, Map<String, ?> urlVariables); static void put(URI url, Object request); static void delete(String url, Object... urlVariables); static void delete(String url, Map<String, ?> urlVariables); static void delete(URI url); static Set<HttpMethod> options(String url, Object... urlVariables); static Set<HttpMethod> options(String url, Map<String, ?> urlVariables); static Set<HttpMethod> options(URI url);  }