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
csv, and so on).
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 ...