All Downloads are FREE. Search and download functionalities are using the official Maven repository.

spring.session.xml Maven / Gradle / Ivy

The newest version!
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns="http://www.springframework.org/schema/beans"
	xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">
	<!-- SPRING-SESSION -->
	<bean class="org.springframework.session.data.redis.config.annotation.web.http.RedisHttpSessionConfiguration">
        <property name="maxInactiveIntervalInSeconds" value="${session.maxInactiveInterval}" />
        <property name="redisNamespace" value="${session.redis.namespace}" />
	</bean>
	<bean id="sessionListener" class="com.wichell.core.listener.SessionListener" />
	<bean class="org.springframework.session.config.annotation.web.http.SpringHttpSessionConfiguration">
		<property name="httpSessionListeners">
			<list>
				<ref bean="sessionListener"/>
			</list>
		</property>
	</bean>
	 <!-- 设置Cookie domain 和 名称 -->
    <bean id="defaultCookieSerializer" class="org.springframework.session.web.http.DefaultCookieSerializer">
        <!-- <property name="domainName" value="www.example.com"/> -->
        <property name="cookieName" value="JSESSIONID"/>
        <property name="cookiePath" value="/" />
        <property name="domainNamePattern" value="^.+?\\.(\\w+\\.[a-z]+)$"/>
    </bean>
</beans>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy