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);
}
}
In this example I can't get this to work without an error
RepresentationModelNeeds aT.RepresentationModel model = new RepresentationModel();What is the right way to do this without a
Tin the context of a Root Controller?