puzhibing
2025-06-15 0e31bc6ea2f9e9ce9e3f8d8529e0f59ed0b22ed7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package com.stylefeng.guns.config;
 
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Configuration;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
 
/**
 * spring session配置
 *
 * @author fengshuonan
 * @date 2017-07-13 21:05
 */
@Configuration
@EnableRedisHttpSession(maxInactiveIntervalInSeconds = 172800)  //session过期时间  如果部署多机环境,需要打开注释
@ConditionalOnProperty(prefix = "guns", name = "spring-session-open", havingValue = "true")
public class SpringSessionConfig {
 
}