@Retention(value=RUNTIME) @Target(value=TYPE) @Documented @Import(value=MongoHttpSessionConfiguration.class) @Configuration public @interface EnableMongoHttpSession
@Configuration class to expose the
SessionRepositoryFilter as a bean named "springSessionRepositoryFilter" and backed by
Mongo. Use collectionName to change default name of the collection used to
store sessions.
@EnableMongoHttpSession
public class MongoHttpSessionConfig {
@Bean
public MongoOperations mongoOperations() throws UnknownHostException {
return new MongoTemplate(new MongoClient(), "databaseName");
}
}
| Modifier and Type | Optional Element and Description |
|---|---|
String |
collectionName
The collection name to use.
|
int |
maxInactiveIntervalInSeconds
The maximum time a session will be kept if it is inactive.
|
public abstract int maxInactiveIntervalInSeconds
public abstract String collectionName
Copyright © 2014-2017–2018 Pivotal, Inc.. All rights reserved.