修改Web.xml,增加如下内容:
<web-app ……>
<listener>
<listener-class>org.springframework.web.context.request.
RequestContextListener</listener-class>
</listener>
</web-app>
Spring 配置文件:
<bean id="sessionBean" class="test.SessionBean" scope="session"> <aop:scoped-proxy/> </bean>
本文介绍如何在Web.xml中配置Spring的RequestContextListener监听器,并展示了一个Session作用域的Bean配置示例。
962

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



