tags: Spring annotation Request method
Function: both describe the type of request method of the front-end browser and the definition of the request header parameters
Source code
![[ , , (img-vKJAWJGY-1587881365713)(en-resource://database/18306:1)]](https://img-blog.csdnimg.cn/20200426141009321.png)
In fact, it indicates the RequestMethod request method.
![[ , , (img-Cnl18Jng-1587881365726)(en-resource://database/18308:1)]](https://img-blog.csdnimg.cn/20200426141017368.png)
Notes @RestController effect is equivalent to @ Controller + @ ResponseBody Notes GetMapping effect is equivalent to @RequestMapping (method = RequestMethod.GET) Notes PostMapping effect is equivalent...
@GetMapping: Obtain the data directly from the URL and transmit it in a similar format like www.xxx.com/?id=1. For example: In this URL, the request comes to the backend, and it is a Get method, then ...
1、GetMapping(PostMan) Receive a string, long, receive a collection (MAP) GET Request Test Discovery Use @RequestParm can receive parameters GET Request Test Found Not @RequestParm can also receive par...
@ Getmapping, @ postmapping, @ deletemapping distinction Spring4.3 introduces {@ getmapping, @ dletemapping, @ putmapping @ deletemapping, @ PATICHMAPPING} to help simplify the map of common HTTP meth...
The difference is as follows: @Getmapping: Method for maping HTTP GET requests to specific processing programs Specifically, @ getmapping is a combined annotation that is an abbreviation for @RequestM...
You can only initiate a GET request from your browser, you cannot initiate a POST request Use @RequestMapping annotations to initiate GET and POST requests increase: check: delete...
@GetMapping 1. Use @getmapping when the parameters in the method are @ proparam, @ pathvaiable, and use @getmapping @PostMapping 2. When the parameters in the method are @RequestBody, multiple ginseng...
FeTMApping is recognized into postmapping After a large number of tests, as long as the parameters are marked @RequestParam Use the GET request, the parameters label @RequestBody uses the POST request...
@GetMapping A comment for mapping the HTTP GET request to a specific processing program method. Specifically, @ getmapping is a combination of shortcuts @RequestMapping(method = RequestMethod.GET)。 @P...
Let's first take a look at @RequestMApping annotations. @RequestMApping A specific handler method for mapping the URL to the controller class. Can be used in methods or classes. That is, the correspon...