Extending REST handlers to all HTTP methods

This is the core recipe of the chapter. We will detail how to use the Spring MVC method-handlers for HTTP methods that we haven't covered yet: the non-readonly ones.

Getting ready

We will see the returned status codes and the HTTP standards driving the use of the PUT, POST, and DELETE methods. This will get us to configure HTTP-compliant Spring MVC controllers.

We will also review how request-payload mapping annotations such as @RequestBody work under the hood and how to use them efficiently.

Finally, we open a window on Spring transactions, as it is a broad and important topic in itself.

How to do it…

Following the next steps will present the changes applied to two controllers, a service and a repository: ...

Get Spring MVC Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.