SpringHttpSessionConfiguration
是在EnableSpringHttpSession注解中导入的

有一个@Configuration注解表示是一个配置类还实现了implements ApplicationContextAware接口

获取一个SpringSessionRememberMeServices的对象

@PostConstruct注解的init方法:

如果没有配置cookieSerializer 则生成默认缺省的CookieSerializer,并为默认的SessionId解析器添加cookie序列化器属性

生成一个DefaultCookieSerializer对象,通过SessionCookieConfig获取cookie的属性:
name,domain,path,maxAge给DefaultCookieSerializer赋值,如果有usesSpringSessionRememberMeServices为真则添加该属性
网友评论