model.addattribute()的作用

1.往前台传数据,可以传对象,可以传List,通过el表达式 ${}可以获取到,

类似于request.setAttribute("sts",sts)效果一样。

2.@ModelAttribute("model")   注解

 

参考:https://blog.csdn.net/qq_21050291/article/details/72724607

文章来自:https://www.cnblogs.com/yingyigongzi/p/9295696.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3