@RequestMapping(method = RequestMethod.POST)
public ResponseEntity<User> save(@RequestBody User user, UriComponentsBuilder uriComponentsBuilder) {
//save user
user.setId(1L);
MultiValueMap headers = new HttpHeaders();
headers.set("Location", uriComponentsBuilder.path("/users/{id}").buildAndExpand(user.getId()).toUriString());
return new ResponseEntity(user, headers, HttpStatus.CREATED);
}