ws.rs优势
jersey 是jakarta.ws的标准实现之一;在迁移到其他框架减少修改代码
controller 注解区别
| spring webmvc | jakarta.ws.rs | 作用 |
|---|
| RequestMapping | Path | 路径 |
| GetMapping | GET | get请求 |
| PathVariable | PathParam | 简析路径参数 @Path("/{id:\d+}") @PathParam("id") |
| RequestBody | BeanParam FormParam | 获取请求数据 |
| DeleteMapping | DELETE | |
| RequiredPath的defaultValue | DefaultValue | 设置默认值 |