Building a RESTful api with Spring note1

来源:互联网 发布:linux 创建目录结构 编辑:程序博客网 时间:2024/05/18 03:06

Understanding REST in Spring

The Spring framework supports 2 ways of creating RESTful services:

  • using MVC with ModelAndView
  • using HTTP message converters

The Controller

CRUD method

Mapping the HTTP response codes

  • HttpStatus.CREATE
  • HttpStatus.OK

1. Unmapped Requests

2. Valid, Mapped Requests

3. Client Error

4. Using @ExceptionHandler


https://jira.spring.io/browse/SPR-8124
https://jira.spring.io/browse/SPR-7278
https://jira.spring.io/browse/SPR-8406