《Spring in action (5th edition)》Chapter 6 --Creating REST services 重点记录

SpringMVC 拥有的 http 请求处理注解

《Spring in action (5th edition)》Chapter 6 --Creating REST services 重点记录

《Spring in action (5th edition)》Chapter 6 --Creating REST services 重点记录

@RestController 的作用

《Spring in action (5th edition)》Chapter 6 --Creating REST services 重点记录

Spring 解决跨域请求的方式

《Spring in action (5th edition)》Chapter 6 --Creating REST services 重点记录

在方法上方添加 @ResponseStatus 注解设置详细返回状态的好处

《Spring in action (5th edition)》Chapter 6 --Creating REST services 重点记录

put方法与get方法的实际用途

《Spring in action (5th edition)》Chapter 6 --Creating REST services 重点记录

引入 Spring Data REST(由 Spring Data 生成的端点可通过该工具自动生成 Rest API)

《Spring in action (5th edition)》Chapter 6 --Creating REST services 重点记录

指定API的基础路径

《Spring in action (5th edition)》Chapter 6 --Creating REST services 重点记录

自动生成 API 的命名规则

《Spring in action (5th edition)》Chapter 6 --Creating REST services 重点记录

Spring 对于自定义端点的处理方式

《Spring in action (5th edition)》Chapter 6 --Creating REST services 重点记录

手动指定生成的API名称(rel 代表实体中的名称,path 代表 API 名称)

《Spring in action (5th edition)》Chapter 6 --Creating REST services 重点记录

查看所有自动生成的 API

《Spring in action (5th edition)》Chapter 6 --Creating REST services 重点记录

对API展示进行排序以及单页展示条数指定

《Spring in action (5th edition)》Chapter 6 --Creating REST services 重点记录