Fakultas Ilmu Komputer UI

Skip to content
Snippets Groups Projects
Unverified Commit d123e9ca authored by Antoine Rey's avatar Antoine Rey Committed by GitHub
Browse files

Merge pull request #96 from Skan90/patch-2

APPLICATION_JSON_UTF8_VALUE is Deprecated
parents c114f48a 2c120abc
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment