Blame view

src/main/java/com/zteits/oa/configuration/session/HttpSessionConfig.java 978 Bytes
cc51d294   王富生   最初版本提交
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  package com.zteits.oa.configuration.session;
  
  import org.springframework.context.annotation.Bean;
  import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
  import org.springframework.session.web.http.HeaderHttpSessionStrategy;
  import org.springframework.session.web.http.HttpSessionStrategy;
  
  /**
   * Copyright: Copyright (c) 2017  zteits
   *
   * @ClassName: com.zteits.oauth.portal.config.session
   * @Description:
   * @version: v1.0.0
   * @author: atao
   * @date: 2017/5/16   下午9:23
   * Modification History:
   * Date         Author          Version      Description
   * ---------------------------------------------------------*
   * 2017/5/16      atao          v1.0.0          创建
   */
159eaad1   王富生   集成swagger
21
  //@maxInactiveIntervalInSeconds
cc51d294   王富生   最初版本提交
22
23
24
25
26
27
28
29
30
  @EnableRedisHttpSession(maxInactiveIntervalInSeconds=30*24*60*60)
  public class HttpSessionConfig {
  
      @Bean
      public HttpSessionStrategy httpSessionStrategy() {
          return new HeaderHttpSessionStrategy();
      }
  
  }