Class DefaultWebSessionManager

  • java.lang.Object
    • org.springframework.web.server.session.DefaultWebSessionManager
    • Constructor Detail

      • DefaultWebSessionManager

        public DefaultWebSessionManager()
    • Method Detail

      • setSessionIdResolver

        public void setSessionIdResolver(WebSessionIdResolver sessionIdResolver)
        Configure the id resolution strategy.

        By default an instance of CookieWebSessionIdResolver.

        sessionIdResolver - the resolver to use
      • setSessionStore

        public void setSessionStore(WebSessionStore sessionStore)
        Configure the persistence strategy.

        By default an instance of InMemoryWebSessionStore.

        sessionStore - the persistence strategy to use
      • getSession

        public reactor.core.publisher.Mono<WebSession> getSession(ServerWebExchange exchange)
        Description copied from interface: WebSessionManager
        Return the WebSession for the given exchange. Always guaranteed to return an instance either matching to the session id requested by the client, or a new session either because the client did not specify one or because the underlying session expired.
        Specified by:
        getSession in interface WebSessionManager
        exchange - the current exchange
        promise for the WebSession