September 2019
Intermediate to advanced
668 pages
15h 59m
English
Before we can use the persistence layer for creating and deleting information in the database, we need to create the corresponding API operations in our core service APIs.
The API operations for creating and deleting a product entity looks like this:
@PostMapping( value = "/product", consumes = "application/json", produces = "application/json")Product createProduct(@RequestBody Product body);@DeleteMapping(value = "/product/{productId}")void deleteProduct(@PathVariable int productId);