@ The purpose of the Controller annotation is to add back-end controllers to the spring container
@ RequestMapping uses the abbreviation pattern here: in fact, its prototype is @RequestMapping(value ="/anno.do"). The value attribute indicates its mapping path, such as the mapping path here.
For anno.do. This note removes the value attribute and has the following attributes: method, headers, params.

Then visit the ____________. / Successful debugging of anno.do
By default, get access can also be used to access the well-known post @RequestMapping(value ="/anno.do", method = RequestMethod.Post) relative to get method.
Next we configure a request instance for the class
First write back-end controller

This controller indicates that methods in order to access this class must have... / MyRoot
For example, to access the getAge method, the access path must be... / MyRoot/age.do
Let's first visit age.
Add the following code to the index.jsp page

In this way, we can get the age, @RequestParam annotation, which will bind the corresponding parameters in the method (corresponding to the name, for example, the form and method parameter names are used here).
web request parameters with age
Next, we use spring mvc annotation to complete the binding of form parameters and business layer entities.
First create User.java

:@ModelAttribute This annotation can be used for binding web request parameters and method parameters, or for returning values of methods as model data (which is globally valid in classes, such as initUser here).
Method-bound model data can be accessed in any method of this kind.
Then write relevant Jsp pages
reg.jsp