@RequestMapping与@GetMapping和@PostMapping区别

时间:2020-07-25 21:25:06 类型:JAVA
字号:    

@GetMapping用于将HTTP get请求映射到特定处理程序的方法注解

是一个组合注解,是@RequestMapping(method = RequestMethod.GET)的缩写。


@PostMapping用于将HTTP post请求映射到特定处理程序的方法注解

是一个组合注解,是@RequestMapping(method = RequestMethod.POST)的缩写。


<