Add HttpSession XML Guide

Fixes gh-139
This commit is contained in:
Rob Winch
2015-04-10 13:47:37 -05:00
parent 98cb22c670
commit 4f8588b4bf
4 changed files with 211 additions and 13 deletions

View File

@@ -6,13 +6,15 @@
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<!-- tag::beans[] -->
<bean class="sample.EmbeddedRedisConfiguration"/> <!--1-->
<bean class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory"
p:port="${spring.redis.port}"/>
<!--2-->
<context:annotation-config/>
<bean class="org.springframework.session.data.redis.config.annotation.web.http.RedisHttpSessionConfiguration"/>
<bean class="sample.EmbeddedRedisConfiguration"/>
<!--3-->
<bean class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory"
p:port="${spring.redis.port}"/>
<!-- end::beans[] -->
</beans>

View File

@@ -6,31 +6,38 @@
- Location of the XML file that defines the root application context
- Applied by ContextLoaderListener.
-->
<!-- tag::context-param[] -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/spring/*.xml
</param-value>
</context-param>
<!-- end::context-param[] -->
<!-- tag::springSessionRepositoryFilter[] -->
<filter>
<filter-name>springSessionRepositoryFilter</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSessionRepositoryFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- end::springSessionRepositoryFilter[] -->
<!--
- Loads the root application context of this web app at startup.
- The application context is then available via
- WebApplicationContextUtils.getWebApplicationContext(servletContext).
-->
<!-- tag::listeners[] -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<!-- end::listeners[] -->
<servlet>
<servlet-name>session</servlet-name>