Spring中 @PostMapping @GetMapping @DeleteMapping @PutMapping 功能说明
1、@GetMapping
@RequestMapping(method = RequestMethod.GET)的简写
作用:对应查询,表明是一个查询URL映射
2、@PostMapping
@RequestMapping(method = RequestMethod.POST)的简写
作用:对应增加,表明是一个增加URL映射
3、@PutMapping
@RequestMapping(method = RequestMethod.PUT)的简写
作用:对应更新,表明是一个更新URL映射
4、@DeleteMapping
@RequestMapping(method = RequestMethod.DELETE)的简写
作用:对应删除,表明是一个删除URL映射