diff --git a/src/main/java/org/springframework/samples/petclinic/rest/OwnerRestController.java b/src/main/java/org/springframework/samples/petclinic/rest/OwnerRestController.java index e3b3aadb54dd26f4c800e59442dce6aa526e7118..db41a451f299a4eead8a547acc70f4320ebd78f4 100644 --- a/src/main/java/org/springframework/samples/petclinic/rest/OwnerRestController.java +++ b/src/main/java/org/springframework/samples/petclinic/rest/OwnerRestController.java @@ -50,7 +50,7 @@ public class OwnerRestController { @Autowired private ClinicService clinicService; - @RequestMapping(value = "/*/lastname/{lastName}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @RequestMapping(value = "/*/lastname/{lastName}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<Collection<Owner>> getOwnersList(@PathVariable("lastName") String ownerLastName) { if (ownerLastName == null) { ownerLastName = ""; @@ -62,7 +62,7 @@ public class OwnerRestController { return new ResponseEntity<Collection<Owner>>(owners, HttpStatus.OK); } - @RequestMapping(value = "", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @RequestMapping(value = "", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<Collection<Owner>> getOwners() { Collection<Owner> owners = this.clinicService.findAllOwners(); if (owners.isEmpty()) { @@ -71,7 +71,7 @@ public class OwnerRestController { return new ResponseEntity<Collection<Owner>>(owners, HttpStatus.OK); } - @RequestMapping(value = "/{ownerId}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @RequestMapping(value = "/{ownerId}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<Owner> getOwner(@PathVariable("ownerId") int ownerId) { Owner owner = null; owner = this.clinicService.findOwnerById(ownerId); @@ -81,7 +81,7 @@ public class OwnerRestController { return new ResponseEntity<Owner>(owner, HttpStatus.OK); } - @RequestMapping(value = "", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @RequestMapping(value = "", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<Owner> addOwner(@RequestBody @Valid Owner owner, BindingResult bindingResult, UriComponentsBuilder ucBuilder) { BindingErrorsResponse errors = new BindingErrorsResponse(); @@ -96,7 +96,7 @@ public class OwnerRestController { return new ResponseEntity<Owner>(owner, headers, HttpStatus.CREATED); } - @RequestMapping(value = "/{ownerId}", method = RequestMethod.PUT, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @RequestMapping(value = "/{ownerId}", method = RequestMethod.PUT, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<Owner> updateOwner(@PathVariable("ownerId") int ownerId, @RequestBody @Valid Owner owner, BindingResult bindingResult, UriComponentsBuilder ucBuilder) { BindingErrorsResponse errors = new BindingErrorsResponse(); @@ -119,7 +119,7 @@ public class OwnerRestController { return new ResponseEntity<Owner>(currentOwner, HttpStatus.NO_CONTENT); } - @RequestMapping(value = "/{ownerId}", method = RequestMethod.DELETE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @RequestMapping(value = "/{ownerId}", method = RequestMethod.DELETE, produces = MediaType.APPLICATION_JSON_VALUE) @Transactional public ResponseEntity<Void> deleteOwner(@PathVariable("ownerId") int ownerId) { Owner owner = this.clinicService.findOwnerById(ownerId);