Spring Boot - RestTemplate
This guide walks you through the process of creating an application that produces RESTful web services and consumes a RESTful web service. To demonstrates the functionality we need a web service first. Name it ‘REST Producer’, because it provides data for the ‘REST Consumer’ REST Producer Controller Class @ RestController public class Controller { @ Autowired UserService service; @ GetMapping (value = "/getUser" ) public ResponseEntity < Map < Integer , User >> listAllUsers() { return new ResponseEntity <>(service.getUser(), HttpStatus.OK); } @ PostMapping (value = "/deleteUser" ) public ResponseEntity < Map < Integer , User >> deleteUser(@ RequestBody Key key) { return new ResponseEntity <>(service.deleteuser(key.getKey()), HttpStatus.OK); } Key-POJO Class public class Key { private Integer key; public Integer getKey() { return key; } public void se