zoukankan      html  css  js  c++  java
  • Spring session 与 HttpSessionHandler

    spring session sample:

    spring-projects/spring-session: Spring Session
    https://github.com/spring-projects/spring-session

    Spring Session
    https://spring.io/projects/spring-session

    Spring Session - HttpSession (Quick Start)
    https://docs.spring.io/spring-session/docs/current/reference/html5/guides/java-redis.html

    Spring Session
    https://docs.spring.io/spring-session/docs/current/reference/html5/#introduction

    Spring Session
    https://docs.spring.io/spring-session/docs/current/reference/html5/#samples

    Spring Session - Spring Boot
    https://docs.spring.io/spring-session/docs/current/reference/html5/guides/boot-redis.html

    spring-session/spring-session-sample-boot-findbyusername.gradle at 2.2.0.RELEASE · spring-projects/spring-session
    https://github.com/spring-projects/spring-session/blob/2.2.0.RELEASE/spring-session-samples/spring-session-sample-boot-findbyusername/spring-session-sample-boot-findbyusername.gradle

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:context="http://www.springframework.org/schema/context"
        xmlns:p="http://www.springframework.org/schema/p"
        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">
    
        <bean class="org.springframework.session.data.redis.config.annotation.web.http.RedisHttpSessionConfiguration">
        <!--设置过期时间; 如果设置为负数,那么key将永远不会过时,默认值是1800秒 -->
        <property name="maxInactiveIntervalInSeconds" value="180"></property>
            <!--<property name="redisNamespace" value="ianbase"/>-->
            <!--<property name="configureRedisAction" value="NO_OP"/>-->
        </bean>
    
        <!-- spring-applicationcontext.xml中指定的 custom SessionId-->
        <bean id="defaultCookieSerializer" class="org.springframework.session.web.http.DefaultCookieSerializer">
            <property name="cookieName" value="SESSION" />
            <property name="cookiePath" value="/" />
        </bean>
    
        <!-- https://github.com/spring-projects/spring-session/blob/1.3.1.RELEASE/samples/httpsession-xml/src/main/webapp/WEB-INF/web.xml -->
        <!--
        - Location of the XML file that defines the root application context
        - Applied by ContextLoaderListener.
        -->
        <bean class="org.springframework.session.web.http.SessionEventHttpSessionListenerAdapter">  
            <constructor-arg name="listeners">
                <list>
                    <bean class="org.jeecgframework.web.system.listener.OnlineListener" />
                </list>
            </constructor-arg>
        </bean>
    
    </beans>

    使用Spring Session Redis 共享Session 后如何监听Session的sessionDestroyed事件-CSDN论坛

    https://bbs.csdn.net/topics/391967054?page=1

    #10楼的帖子,正确。

    使用Spring Session做分布式会话管理
    https://dorole.com/1422/

    springsession源码分析二之RedisHttpSessionConfiguration_jannal专栏-CSDN博客
    https://blog.csdn.net/usagoole/article/details/80639804

    Spring Boot 中的同一个 Bug,竟然把我坑了两次!_Session
    http://www.sohu.com/a/334511631_505818

    spring-session 使用redis来存储session配置文件_liu20111590的专栏-CSDN博客
    https://blog.csdn.net/liu20111590/article/details/54952951

    使用Spring Session Redis 共享Session 后如何监听Session的sessionDestroyed事件_viaco2love的博客-CSDN博客
    https://blog.csdn.net/viaco2love/article/details/79880751

    Spring-Session+Redis实现session共享 实现统计在线人数和踢除用户下线。 - 蒙奇D流氓 - 博客园
    https://www.cnblogs.com/even247/articles/9134895.html

    Redis实战和核心原理详解(6)使用Spring Session和Redis解决分布式Session跨域共享问题_徐刘根的博客-CSDN博客
    https://blog.csdn.net/xlgen157387/article/details/57406162

    Spring Session Redis最佳实践(4)Session监听器_haiyangyiba的专栏-CSDN博客
    https://blog.csdn.net/haiyangyiba/article/details/90552326

    记录一次struts2转spring MVC的经历_纳米的专栏-CSDN博客
    https://blog.csdn.net/cuixiangjie2012/article/details/80619727

    基于Spring-Session实现会话共享 - 『吴志斌』天道酬勤 - OSCHINA
    https://my.oschina.net/wuzb/blog/821804

    spring-session学习_zcl111的博客-CSDN博客
    https://blog.csdn.net/zcl111/article/details/51700925

    <?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:context="http://www.springframework.org/schema/context"xmlns:p="http://www.springframework.org/schema/p"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsdhttp://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
    <bean class="org.springframework.session.data.redis.config.annotation.web.http.RedisHttpSessionConfiguration"><!--设置过期时间; 如果设置为负数,那么key将永远不会过时,默认值是1800秒 --><property name="maxInactiveIntervalInSeconds" value="180"></property><!--<property name="redisNamespace" value="ianbase"/>--><!--<property name="configureRedisAction" value="NO_OP"/>--></bean>
    <!-- spring-applicationcontext.xml中指定的 custom SessionId--><bean id="defaultCookieSerializer" class="org.springframework.session.web.http.DefaultCookieSerializer"><property name="cookieName" value="SESSION" /><property name="cookiePath" value="/" /></bean>
    <!-- https://github.com/spring-projects/spring-session/blob/1.3.1.RELEASE/samples/httpsession-xml/src/main/webapp/WEB-INF/web.xml --><!--- Location of the XML file that defines the root application context- Applied by ContextLoaderListener.--><bean class="org.springframework.session.web.http.SessionEventHttpSessionListenerAdapter">  <constructor-arg name="listeners"><list><bean class="org.jeecgframework.web.system.listener.OnlineListener" /></list></constructor-arg></bean>
    </beans>

  • 相关阅读:
    word设置的密码忘了怎么办?
    Navicat Report Viewer 设置 HTTP 的方法
    如何处理Navicat Report Viewer 报表
    excel密码忘记了怎么办
    Beyond Compare文本比较搜索功能详解
    Popular Cows POJ
    Problem B. Harvest of Apples HDU
    网络流模型整理
    The Shortest Statement CodeForces
    Vasya and Multisets CodeForces
  • 原文地址:https://www.cnblogs.com/rgqancy/p/12171680.html
Copyright © 2011-2022 走看看