1. @ requestmapping:
In dispatcher, handlermapping (to implement annotation at the type level) and handleradapter (to implement annotation at the method level) appear, which are default in dispatcherservlet and dispatcherportlet.
2. @ requestmapping annotation methods can have the following types of methods (in any order, unless the verification results need to be followed by the corresponding command image)
1). Request/response (servlet API or Portlet API)
2). session image (servlet API or Portlet API)
3). webrequest/nativewebrequest
4). inputstream/reader is used to access the requested content
5). outputstream/writer is used to generate the response content
6) parameters annotated with @ requestparam are used to access specific servlet/Portlet request parameters. The parameter value is converted to the declared method parameter type.
7). MAP/model/modelmap is used to enrich the hidden model exposed to the Web View.
8 ). bind parameters to the command/form object: bean attributes/fields with custom type conversion depend on the @ initbinder method/handleradapter configuration. For details, see the "webbindinginitializer" attribute of annotationmethodhandleradapter, such command pairs include their verification results and will be exposed as model attributes. By default, unqualified command class names (for example, for type "mypackage. orderaddress "use" orderaddress "). Specify a parameter-level modelattribute annotation for a specific model attribute name
9). The bindingresult verification result is used for the preceding command/form object (the preceding parameter)
10). sessionstatus processing is used to mark the form processing process as completed (triggering session attribute cleanup, which is indicated by @ sessionattribute annotation at the handle type level)
3. The @ requestparam annotation parameter is required by default. If @ requestparam (value = "ID", required = "false") is set, this parameter is optional.