@RequestMethod, @GetMapping, @PostMapping-request method

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

@RequestMapping
GetMapping
@PostMapping
@PutMapping
@DeleteMapping
@PatchMapping

@RequestMapping

Source code
[ , , (img-vKJAWJGY-1587881365713)(en-resource://database/18306:1)]

@GetMethod wait six

In fact, it indicates the RequestMethod request method.

[ , , (img-Cnl18Jng-1587881365726)(en-resource://database/18308:1)]

Intelligent Recommendation

@RestController,@GetMapping,@PostMapping,@EnableDiscoveryClient

Notes @RestController effect is equivalent to @ Controller + @ ResponseBody Notes GetMapping effect is equivalent to @RequestMapping (method = RequestMethod.GET) Notes PostMapping effect is equivalent...

The difference between @GetMapping and @PostMapping

@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 ...

GetMapping and Postmapping into the group solution

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

@ Getmapping, @ postmapping, @ deletemapping distinction Spring4.3 introduces {@ getmapping, @ dletemapping, @ putmapping @ deletemapping, @ PATICHMAPPING} to help simplify the map of common HTTP meth...

@ Getmapping, @ postmapping and @RequestMApping distinction

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...

More Recommendation

@Requestmapping relationship with @getmapping and @postmapping

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...

@RequestBody @GetMapping @PostMapping

@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...

SpringCloud Feign getmapping and postmapping

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...

@POSTMAPPING and @getmapping when used

@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...

@Getmapping and @postmapping details

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...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top