Created
June 6, 2017 03:56
-
-
Save gregturn/d3d17c3cd21e5d076e14e43944f824b3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@GetMapping(value = "/supervisors/{id}", produces = MediaTypes.HAL_JSON_VALUE) | |
public ResponseEntity<Resource<Supervisor>> findOne(@PathVariable Long id) { | |
Resource<Manager> managerResource = controller.findOne(id).getBody(); | |
Resource<Supervisor> supervisorResource = new Resource<>( | |
new Supervisor(managerResource.getContent()), | |
managerResource.getLinks()); | |
return ResponseEntity.ok(supervisorResource); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment