-
Notifications
You must be signed in to change notification settings - Fork 184
Open
Description
In this example I can't get this to work without an error RepresentationModel Needs a T.
RepresentationModel model = new RepresentationModel();
What is the right way to do this without a T in the context of a Root Controller?
/**
* @author Greg Turnquist
*/
@RestController
class RootController {
@GetMapping("/")
ResponseEntity<RepresentationModel> root() {
RepresentationModel model = new RepresentationModel();
model.add(linkTo(methodOn(RootController.class).root()).withSelfRel());
model.add(linkTo(methodOn(EmployeeController.class).findAll()).withRel("employees"));
model.add(linkTo(methodOn(EmployeeController.class).findAllDetailedEmployees()).withRel("detailedEmployees"));
model.add(linkTo(methodOn(ManagerController.class).findAll()).withRel("managers"));
return ResponseEntity.ok(model);
}
}
Metadata
Metadata
Assignees
Labels
No labels