An HTTP response carries data from a backend to a client in reply to a request. It includes a status and may carry headers and a body. section 10.3
The main parts of a response are:
- Response headers: short pieces of information. section 10.3
- Response body: the larger amount of data sent back. section 10.3
- Response status: a short indication of the request’s result. section 10.3
For a REST endpoint, Spring MVC returns the controller action’s result directly in the HTTP response, without rendering a view. section 10.1
Figure 10.2 When implementing REST endpoints, the Spring MVC flow changes. The app no longer needs a view resolver because the client needs the data returned by the controller’s action directly. Once the controller’s action is completed, the dispatcher servlet returns the HTTP response without rendering any view.

Follow how Spring MVC returns the controller action’s result as a response without a view resolver. section 10.1






