Upgrade to Spring Boot 2.3 and related changes.
This commit is contained in:
@@ -525,7 +525,7 @@ public class SupervisorController {
|
||||
public ResponseEntity<EntityModel<Supervisor>> findOne(@PathVariable Long id) {
|
||||
|
||||
EntityModel<Manager> managerResource = controller.findOne(id).getBody();
|
||||
EntityModel<Supervisor> supervisorResource = new EntityModel<>(
|
||||
EntityModel<Supervisor> supervisorResource = EntityModel.of(
|
||||
new Supervisor(managerResource.getContent()),
|
||||
managerResource.getLinks());
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ class EmployeeController {
|
||||
Links newLinks = collectionModel.getLinks().merge(Links.MergeMode.REPLACE_BY_REL,
|
||||
linkTo(methodOn(EmployeeController.class).findEmployees(id)).withSelfRel());
|
||||
|
||||
return ResponseEntity.ok(new CollectionModel<>(collectionModel.getContent(), newLinks));
|
||||
return ResponseEntity.ok(CollectionModel.of(collectionModel.getContent(), newLinks));
|
||||
}
|
||||
|
||||
@GetMapping("/employees/detailed")
|
||||
|
||||
@@ -41,7 +41,7 @@ public class SupervisorController {
|
||||
|
||||
EntityModel<Manager> managerResource = controller.findOne(id).getBody();
|
||||
|
||||
EntityModel<Supervisor> supervisorResource = new EntityModel<>( //
|
||||
EntityModel<Supervisor> supervisorResource = EntityModel.of( //
|
||||
new Supervisor(managerResource.getContent()), //
|
||||
managerResource.getLinks());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user