Common annotations for SpringMVC:
- @The Controller is responsible for registering a bean into the spring context.
- @The RequestMapping annotation specifies which URL requests the controller can handle.
- @The RequestBody annotation is used to read the body data of the Request request, parse it using the system's default configured HttpMessage Converter, bind the corresponding data to the object to be returned, and then bind the object data returned by HttpMessage Converter to the parameters of the method in the controller.
- @ModelAttribute uses @ ModelAttribute annotation on method definition: Spring MVC will first call each method labeled with @ ModelAttribute at the method level before calling the target processing method.
- @PathVariable can pass request parameters to the requesting method by using @ RequestParam at the input of the processing method.