Chapter 3. The First Endpoint

In the previous chapter, we looked at how to set up the scaffolding required to build a RESTful web service. We can now start implementing our first endpoint. As introduced in Chapter 1, A Few Basics, Spring Web MVC provides the necessary tools to create controllers in a RESTful manner. To illustrate their use, we will lean on our sample web service. More specifically, we will start implementing the Inventory component of our service.

This chapter will go over the following topics:

  • The Inventory component of our sample web service
  • Spring constructs to build RESTful endpoints
  • Running our first endpoint
  • A brief discussion on data presentation

The Inventory service

At the heart of our property management service lies rooms ...

Get Building a RESTful Web Service with Spring 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.