|
@@ -2,17 +2,12 @@ package com.ningdatech.pmapi.user.security.auth.config;//package com.ningdatech. |
|
|
|
|
|
|
|
|
import com.ningdatech.pmapi.common.constant.BizConst; |
|
|
import com.ningdatech.pmapi.common.constant.BizConst; |
|
|
import com.ningdatech.pmapi.user.security.auth.constants.SessionTimeConstant; |
|
|
import com.ningdatech.pmapi.user.security.auth.constants.SessionTimeConstant; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
|
|
import org.springframework.boot.autoconfigure.AutoConfigureAfter; |
|
|
|
|
|
import org.springframework.context.annotation.Bean; |
|
|
import org.springframework.context.annotation.Bean; |
|
|
import org.springframework.context.annotation.Configuration; |
|
|
import org.springframework.context.annotation.Configuration; |
|
|
import org.springframework.session.data.redis.config.annotation.web.http.RedisHttpSessionConfiguration; |
|
|
|
|
|
|
|
|
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession; |
|
|
import org.springframework.session.web.http.CookieHttpSessionIdResolver; |
|
|
import org.springframework.session.web.http.CookieHttpSessionIdResolver; |
|
|
import org.springframework.session.web.http.DefaultCookieSerializer; |
|
|
import org.springframework.session.web.http.DefaultCookieSerializer; |
|
|
|
|
|
|
|
|
import javax.annotation.PostConstruct; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* <p> |
|
|
* <p> |
|
|
* 设置session的过期时间为一天 |
|
|
* 设置session的过期时间为一天 |
|
@@ -23,8 +18,7 @@ import javax.annotation.PostConstruct; |
|
|
* @Version 1.0 |
|
|
* @Version 1.0 |
|
|
**/ |
|
|
**/ |
|
|
@Configuration |
|
|
@Configuration |
|
|
@RequiredArgsConstructor |
|
|
|
|
|
@AutoConfigureAfter(RedisHttpSessionConfiguration.class) |
|
|
|
|
|
|
|
|
@EnableRedisHttpSession |
|
|
public class RedisSessionConfig { |
|
|
public class RedisSessionConfig { |
|
|
|
|
|
|
|
|
@Bean |
|
|
@Bean |
|
|