O'Reilly logo

Spring MVC Cookbook by Alex Bretet

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

Binding requests and marshalling responses

This recipe explains how to configure Spring MVC for REST handlers to be as integrated as possible with their business domain. We focus on designing self-explanatory method handlers, externalized type conversions, and abstracted response marshalling (serialization to specific formats such as json, xml, csv, and so on).

Getting ready

We are going to review the configuration changes applied to the cloudstreetmarket-api webapp in order to set up a Type conversion from either a request parameter or a URI template variable.

We will see how to configure automatic marshalling (for responses) into json. We will focus on two very simple method handlers created for this chapter.

How to do it...

The following steps describe ...

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