springmvc数据绑定,作验证时,方式应该以下写:spring
public String add(@Valid User user,BindingResult binding),里面要有处理验证结果的BindResult若是没有加,像以下这样:mvc
public String add(@Valid User user),则会报错,报错内容以下:spa
type Status reportorm
messageip
description The request sent by the client was syntactically incorrect.it