Campbell Ritchie wrote:All right then. I agree about the intent. But the compiler won't see that; it will see a method with missing return type.
Junilu Lacar wrote:. . . The intent was clearly to make a constructor . . .
Himai Minh wrote:One more fix for your UpdateUser:
The reason for the changes:
Binding Result always return an error in the original code because your customer in the update form does not have city of residence, ssn, country of residence , gender. It always returns binding result error.
It is a validation error.
In this case, we don't really need to validate.
And in this new method, we should pass the a customer model attribute to the Thymleaf form. The customer has updated/same email, name, surname. Then, save the updated information.