原来用spring-session1.3.2,进行单点登陆,但升级到2.0.0后,发现原来的类HttpSessionStrategy报错了,没有该类。
经分析,原来的类要调整为HeaderHttpSessionIdResolver
@Bean
public HeaderHttpSessionIdResolver httpSessionStrategy() {
return new HeaderHttpSessionIdResolver("x-auth-token");
}
调整成这个,功能正常。
HttpSessionStrategy与HeaderHttpSessionIdResolver不一样是,原来默认的token为x-auth-token,变成X-Auth-Token,大小写变化了.