GET请求
场景:⼀般的查询接⼝就是get请求
注解:@GetMapping = @RequestMapping(method = RequestMethod.GET)
⼀个顶两的注解
@GetMapping = @RequestMapping(method = RequestMethod.GET)
@PostMapping = @RequestMapping(method = RequestMethod.POST)
@PutMapping = @RequestMapping(method = RequestMethod.PUT)
@DeleteMapping = @RequestMapping(method = RequestMethod.DELETE)
举例
@Autowired
private VideoService videoService;
// @RequestMapping(value = "/list",method = RequestMethod.GET)
@GetMapping("list")
public JsonData list() throws JsonProcessingException