In springMVC, We use model.addAttribute(String,String) to add something into request, then we can fetch it in the forward JSP page through EL expression. Now I find that if we use @SessionAttributes() to add the object into session when we use model.addAttribute(String,String) at the same time, then we can use the objects between different controllers. This session is completely same with request.getSession(). It's really good for our developers.
转载于:https://www.cnblogs.com/frankliiu-java/archive/2009/12/14/1623488.html
本文探讨了 Spring MVC 框架中如何利用 @SessionAttributes 和 model.addAttribute 方法管理会话数据,使得数据可以在不同控制器间共享。这种方法为开发者提供了便利。
1967

被折叠的 条评论
为什么被折叠?



