Is Spring MVC using getters and setters to set the values of ModelAttribute objects? Can you please cite me sources that says so. And if not, how could we force Spring MVC to use setters to set the properties of the model object?
Thanks.
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.
I don’t know if this really answers the question, but I found this quote in the documentation:
This seems to imply that setters will be used if available, with direct update of the fields as a fallback.
But if you want a definitive answer, look at the source code.