@ModelAttribute
Learn @ModelAttribute (Form Handling, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Fresher Notes @ModelAttribute marks a method parameter that Spring binds from request data and adds to the model, or a method that adds data to the model before every handler. On a parameter : @ModelAttribute("form") RegisterForm form creates the object, binds the parameters and exposes it to the view under the name form . Default name : without a name Spring uses the decapitalized class name, so RegisterForm becomes registerForm .