diff --git a/src/main/java/org/springframework/samples/petclinic/rest/PetRestController.java b/src/main/java/org/springframework/samples/petclinic/rest/PetRestController.java index 41425bce4..ac42e0084 100644 --- a/src/main/java/org/springframework/samples/petclinic/rest/PetRestController.java +++ b/src/main/java/org/springframework/samples/petclinic/rest/PetRestController.java @@ -57,6 +57,11 @@ public class PetRestController { return new ResponseEntity(pet, HttpStatus.OK); } + @RequestMapping(value = "/", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + public ResponseEntity> getPets(){ + return new ResponseEntity>(this.clinicService.findAllPets(), HttpStatus.OK); + } + @RequestMapping(value = "/pettypes}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public ResponseEntity> getPetTypes(){ return new ResponseEntity>(this.clinicService.findPetTypes(), HttpStatus.OK);