O'Reilly logo

Mastering Spring Application Development by Anjana Mankale

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required