use of org.springframework.session.web.server.session.SpringSessionWebSessionStore in project spring-session by spring-projects.
the class SpringWebSessionConfiguration method webSessionManager.
/**
* Configure a {@link WebSessionManager} using a provided {@link ReactiveSessionRepository}.
*
* @param repository a bean that implements {@link ReactiveSessionRepository}.
* @return a configured {@link WebSessionManager} registered with a preconfigured name.
*/
@Bean(WebHttpHandlerBuilder.WEB_SESSION_MANAGER_BEAN_NAME)
public WebSessionManager webSessionManager(ReactiveSessionRepository<? extends Session> repository) {
SpringSessionWebSessionStore<? extends Session> sessionStore = new SpringSessionWebSessionStore<>(repository);
DefaultWebSessionManager manager = new DefaultWebSessionManager();
manager.setSessionStore(sessionStore);
if (this.webSessionIdResolver != null) {
manager.setSessionIdResolver(this.webSessionIdResolver);
}
return manager;
}
Aggregations