An Error/BindingResult argument is expected to be declared immediately after the model attribute

编程知识 更新时间:2023-05-02 19:01:05

参考博客:
SpringMVC参数顺序不同导致异常:
http://www.iteye/topic/1131734

SpringMVC数据验证——第七章 注解式控制器的数据验证、类型转换及格式化——跟着开涛学SpringMVC:
http://jinnianshilongnian.iteye/blog/1733708

出错主要原因:
http://blog.csdn/okey88/article/details/8112308

使用SpringMVC进行后台数据校验时产生的错误

找了一下网上资料,又看了看大神关于SpingMVC数据校验的博客,发现出现错误的原因是:在spring mvc中,BindingResult的对象必须与@ModelAttribute声明的对象绑定。在controller的方法中,BindingResult对象参数必须与@ModelAttribute挨着。
然后关于后台数据校验的教程,可以参考开涛老师的教程:
http://jinnianshilongnian.iteye/blog/1733708

更多推荐

An Error/BindingResult argument is expected to be declared immediately after the

本文发布于:2023-04-28 04:16:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/054aca3068ff9be57bfe2c43ab997f90.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:argument   expected   Error   BindingResult   model

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!

  • 107583文章数
  • 27225阅读数
  • 0评论数