SpringMVC中的Model和SessionAttribute

https://blog.csdn.net/maoyeqiu/article/details/49719437

Model的作用域类似于request但不是request,前台发出请求后在调用controller中的方法前会将请求的参数填充到model中,在执行了handler方法之后才会把Model中的数据填充到request中。

@SessionAttributes(“attributeName”)
在加载视图之前将model中的属性添加到httpSession中。

posted @ 2019-02-12 17:52  快乐的内啡肽呀  阅读(28)  评论(0)    收藏  举报