springmvc中RedirectAttributes、SessionFlashMapManager的作用

RedirectAttributes 在重定向的时候可以传参,不能跨站传参,因为参数是保存在服务器端Session中
SessionFlashMapManager 是RedirectAttributes的内部实现管理类

SessionFlashMapManager flashMapManager = new SessionFlashMapManager();
FlashMap flashMap = new FlashMap();
flashMap.put("key","value");
flashMapManager.saveOutputFlashMap(flashMap,getHttpServletRequest(),getHttpServletResponse());

posted @ 2016-03-12 15:02  べ袽猓柯苡づ  阅读(430)  评论(0编辑  收藏  举报