Upgrade to Spring Boot 2.3 and related changes.

This commit is contained in:
Greg L. Turnquist
2020-10-20 16:24:26 -05:00
parent 1d12ed185c
commit 5f74daf4bd
13 changed files with 44 additions and 35 deletions

View File

@@ -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());

View File

@@ -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")

View File

@@ -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());