I am new to spring mvc and have seen examples where folks use @ModelAttribute("form") Person person in method parameter and some who just do (Person person). what is the difference.
Thanks in advance
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
@ModelAttributeallows you to specify the name of the model attribute. When parameter doesn’t have this annotation, a decapitalized class name is used as an attribute name, i.e.Person p-> “person”.