spring版本:5.23,在这里插入图片描述使用的jar包:
网盘:链接:https://pan.baidu.com/s/1cEjMUc56nwM6n88j2a46Jg
码m9pb
奶牛快传(会过期):https://c-t.work/s/f3fff53b491048
问题所在
@RequestMapping(value = "/list", method = RequestMethod.POST)
public String add(@Valid Student student,Map<String,Object> map,
BindingResult result){...}
BindingResult应该紧跟随在实体类对象后面,即正确的应该是:
@RequestMapping(value = "/list", method = RequestMethod.POST)
public String add(@Valid Student student,BindingResult result,
Map<String,Object> map){...}
注意BindingResult result的书写顺序,感谢博客:
http://www.mamicode.com/info-detail-2129787.html第四点给予的提示