Posted On: Mar 31, 2020
Some of the annotations for HTTP request methods in Spring MVC are,
@RequestMapping - It is used to mark request handler methods.
@RequestBody - It is used to map the body of the HTTP request to an object.
@PathVariable - It is used to bound method argument to a URI template variable.
@RequestParam - It is used for accessing HTTP request parameters.
Some other annotations are
@ResponseBody, @ExceptionHandler, @ResponseStatus, @Controller, @RestController, @ModelAttribute, and @CrossOrigin.
Never Miss an Articles from us.