@RequestMapping和@GetMapping和PostMapping的区别

其实很简单

GetMapping

> @GetMaping用于将HTttp get请求映射到特定处理程序的方法注解,具体来说

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

PostMapping

@PostMapping用于将Http post请求映射到特定处理程序的方法注解,具体来说,

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





posted @ 2020-08-25 15:02  Patrick&Star  阅读(2512)  评论(0编辑  收藏  举报