Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RestTemplate restTemplate = new RestTemplate();
- UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(customerAPIUrl);
- ResponseEntity<CustomerDTO> result = restTemplate.exchange(builder.toUriString(), HttpMethod.GET, null, CustomerDTO.class);
- System.out.println("Name:"+result.getBody().getName());
- System.out.println("Email:"+result.getBody().getEmail());
Advertisement
Add Comment
Please, Sign In to add comment