@GetMapping 和PostMapping,RequestMapping区别

1.@GetMapping是一个组合注解,是@RequestMapping(method = 
RequestMethod.GET)的缩写。该注解将HTTP Get 映射到 特定的处理方法上。 
2 .同理PostMapping也是一个组合注解,是@RequestMapping(method = 
RequestMethod.POST)的缩写。

3.@RequestMapping如果没有指定请求方式,将接收Get、Post、Head、Options等所有的请求方式
 

猜你喜欢

转载自blog.csdn.net/qq_37557563/article/details/89087814