Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Mastering Spring Application Development
  • Table Of Contents Toc
Mastering Spring Application Development

Mastering Spring Application Development

By : Anjana Mankale
2 (1)
close
close
Mastering Spring Application Development

Mastering Spring Application Development

2 (1)
By: Anjana Mankale

Overview of this book

If you are a Java developer with experience in developing applications with Spring, then this book is perfect for you. A good working knowledge of Spring programming conventions and applying dependency injections is recommended to make the most of this book.
Table of Contents (14 chapters)
close
close
13
Index

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 the application. You can see that we have used the parent Spring boot reference here, so that we can resolve all the dependency references. We have also set that Java version as 1.7 in the pom.xml file.

<project xmlns:xsi="http://www.w3...
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Mastering Spring Application Development
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon