@GetMapping and PostMapping, the difference between RequestMapping

1. @GetMapping is a combined annotation, which is
the abbreviation of @RequestMapping(method =  RequestMethod.GET). This annotation maps HTTP Get to a specific processing method. 
2. Similarly, PostMapping is also a composite annotation, which is
an abbreviation of @RequestMapping(method =  RequestMethod.POST).

3. If @RequestMapping does not specify a request method, it will receive all request methods such as Get, Post, Head, Options, etc.
 

Guess you like

Origin blog.csdn.net/qq_37557563/article/details/89087814