I think you may be having the same issue as I did - please see :
There it is answered by Daniel Fernandez
. Basically your form object th:object="${form}"
is named "form"
but your controller is looking for "customerForm"
(class name) not "form"
(the variable name)
can be renamed with @ModelAttribute("data")
copied from that link use:
public String post(@Valid FormData formData, BindingResult result, Model model){
// th:object="${formData}"
}
or
public String post(@Valid @ModelAttribute("data") FormData data, BindingResult result, Model model){
// th:object="${data}"
}