diff --git a/ddd/src/main/java/com/baeldung/ddd/layers/application/controller/OrderController.java b/ddd/src/main/java/com/baeldung/ddd/layers/application/controller/OrderController.java index 6dc8e4c215..e3909013b7 100644 --- a/ddd/src/main/java/com/baeldung/ddd/layers/application/controller/OrderController.java +++ b/ddd/src/main/java/com/baeldung/ddd/layers/application/controller/OrderController.java @@ -21,19 +21,19 @@ public class OrderController { this.orderService = orderService; } - @PostMapping(produces = MediaType.APPLICATION_JSON_UTF8_VALUE, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) + @PostMapping(produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) CreateOrderResponse createOrder(@RequestBody final CreateOrderRequest createOrderRequest) { final UUID id = orderService.createOrder(createOrderRequest.getProduct()); return new CreateOrderResponse(id); } - @PostMapping(value = "/{id}/products", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) + @PostMapping(value = "/{id}/products", consumes = MediaType.APPLICATION_JSON_VALUE) void addProduct(@PathVariable final UUID id, @RequestBody final AddProductRequest addProductRequest) { orderService.addProduct(id, addProductRequest.getProduct()); } - @DeleteMapping(value = "/{id}/products", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) + @DeleteMapping(value = "/{id}/products", consumes = MediaType.APPLICATION_JSON_VALUE) void deleteProduct(@PathVariable final UUID id, @RequestParam final UUID productId) { orderService.deleteProduct(id, productId); }