Annotation Interface EnableSpringWebSession


@Retention(RUNTIME) @Target(TYPE) @Documented @Import(SpringWebSessionConfiguration.class) public @interface EnableSpringWebSession
Add this annotation to a @Configuration class to configure a WebSessionManager for a WebFlux application. This annotation assumes a ReactiveSessionRepository is defined somewhere in the application context. If not, it will fail with a clear error message. For example:
 
 @Configuration(proxyBeanMethods = false)
 @EnableSpringWebSession
 public class SpringWebFluxConfig {

     @Bean
     public ReactiveSessionRepository sessionRepository() {
         return new ReactiveMapSessionRepository(new ConcurrentHashMap<>());
     }

 }
  
Since:
2.0