@Retention(value=RUNTIME) @Target(value=TYPE) @Documented @Import(value=ReactiveMongoWebSessionConfiguration.class) @Configuration(proxyBeanMethods=false) public @interface EnableMongoWebSession
@Configuration
class to configure a MongoDB-based
WebSessionManager
for a WebFlux application. This annotation assumes a
ReactorMongoOperations
is defined somewhere in the application context. If not,
it will fail with a clear error messages. For example:
@Configuration
@EnableMongoWebSession
public class SpringWebFluxConfig {
@Bean
public ReactorMongoOperations operations() {
return new MaReactorMongoOperations(...);
}
}
Modifier and Type | Optional Element and Description |
---|---|
java.lang.String |
collectionName
The collection name to use.
|
int |
maxInactiveIntervalInSeconds
The maximum time a session will be kept if it is inactive.
|