From e041803e588f93f4ca6aafce298f61f34c7e2624 Mon Sep 17 00:00:00 2001 From: PEDSF Date: Sat, 10 Oct 2020 17:44:38 +0200 Subject: [PATCH] Solved getter bug in PetDTO --- .../samples/petclinic/controller/PetController.java | 1 + .../java/org/springframework/samples/petclinic/dto/PetDTO.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/springframework/samples/petclinic/controller/PetController.java b/src/main/java/org/springframework/samples/petclinic/controller/PetController.java index eb9726b32..45f7c7b36 100644 --- a/src/main/java/org/springframework/samples/petclinic/controller/PetController.java +++ b/src/main/java/org/springframework/samples/petclinic/controller/PetController.java @@ -49,6 +49,7 @@ class PetController { private final PetTypeService petTypeService; + @Autowired PetController(OwnerService ownerService, PetService petService, PetTypeService petTypeService) { this.ownerService = ownerService; this.petService = petService; diff --git a/src/main/java/org/springframework/samples/petclinic/dto/PetDTO.java b/src/main/java/org/springframework/samples/petclinic/dto/PetDTO.java index af838e665..5b5925adc 100644 --- a/src/main/java/org/springframework/samples/petclinic/dto/PetDTO.java +++ b/src/main/java/org/springframework/samples/petclinic/dto/PetDTO.java @@ -54,7 +54,7 @@ public class PetDTO extends NamedDTO { this.type = type; } - public OwnerDTO getOwnerDTO() { + public OwnerDTO getOwner() { return owner; }