//package com.ssm.config;
//
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.scheduling.TaskScheduler;
//import org.springframework.scheduling.concurrent.ConcurrentTaskScheduler;
//import org.springframework.session.data.redis.RedisFlushMode;
//import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
//import org.springframework.session.web.http.CookieSerializer;
//import org.springframework.session.web.http.DefaultCookieSerializer;
//
//@Configuration
//@EnableRedisHttpSession(maxInactiveIntervalInSeconds=1800,redisNamespace="DmWebApp",redisFlushMode= RedisFlushMode.ON_SAVE)
//public class HttpSessionConfig {
//
//    @Bean
//    public TaskScheduler taskScheduler() {
//        return new ConcurrentTaskScheduler();
//    }
//
//
//    @Bean
//    public CookieSerializer cookieSerializer() {
//        DefaultCookieSerializer serializer = new DefaultCookieSerializer();
//        serializer.setCookieName("DM_WEB");
//        serializer.setDomainNamePattern("^.+?\\.(\\w+\\.[a-z]+)$");
//        serializer.setCookiePath("/");
//        serializer.setSameSite("None");
//        serializer.setUseSecureCookie(true);
//        return serializer;
//    }
//}
