RestfulWebService using Spring Boot

In this section, let's develop a simple restful service and bootstrap the application using SpringBoot. We will also create a simple restful service that will store the product information into the database.

The Product creation scenario should satisfy the following mentioned use cases:

  • Given that no product with the same Product_id exists, it should store a new product in the database and immediately return the stored object.
  • Given there exist a product with the same Product_id, it should not store, but return an error status with the relevant message.
  • Given there are previously stored products, it should be able to retrieve the list of them.

Following is the of pom.xml file, for the dependency reference used in ...

Get Mastering Spring Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.