标签:request session global session 作用域 requestcontextlisten
首先在web.xml配置
<web-app> ... <listener> <listener-class> org.springframework.web.context.request.RequestContextListener </listener-class> </listener> ... </web-app>
... HttpServletRequest request = ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getRequest(); ...
使得任何Bean在Spring IOC容器中可以访问request、session、global Session作用域,RequestContextListener
标签:request session global session 作用域 requestcontextlisten
原文地址:http://blog.csdn.net/u013474104/article/details/45641651