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.
MVC (Model-View-Controller) pattern is an application design model that is comprised of three interconnected parts. Here, the model represents the object. It can also have logic to update the controll...
Spring MVC framework is a type of Model-View-Controller architecture that provides components to develop flexible and loosely coupled web applications. This Java framework provides the DispatchServlet...
The DispatcherServlet class s used to receive the incoming request and map the request to the right resource like controllers, models, and views. Apart from acting as a controller, the DispatchSetvler...