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.
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.
Following the next steps will present the changes applied to two controllers, a service and a repository:
From the Git Perspective in Eclipse, checkout the latest version of the branch
v7.x.x
. Then, run amaven clean install
on thecloudstreetmarket-parent
module (right-click on the module and go to Run as… | Maven Clean and then again go to Run as… | Maven...