Commit 0c036a69 authored by Vedran Pavic's avatar Vedran Pavic Committed by Andy Wilkinson

Improve Spring Session MongoDB support naming

parent c03bb4c1
......@@ -24,7 +24,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Andy Wilkinson
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "spring.session.mongo")
@ConfigurationProperties(prefix = "spring.session.mongodb")
public class MongoSessionProperties {
/**
......
......@@ -35,7 +35,7 @@ final class SessionStoreMappings {
static {
Map<StoreType, Class<?>> mappings = new HashMap<>();
mappings.put(StoreType.REDIS, RedisSessionConfiguration.class);
mappings.put(StoreType.MONGO, MongoSessionConfiguration.class);
mappings.put(StoreType.MONGODB, MongoSessionConfiguration.class);
mappings.put(StoreType.JDBC, JdbcSessionConfiguration.class);
mappings.put(StoreType.HAZELCAST, HazelcastSessionConfiguration.class);
mappings.put(StoreType.NONE, NoOpSessionConfiguration.class);
......
......@@ -32,9 +32,9 @@ public enum StoreType {
REDIS,
/**
* Mongo backed sessions.
* MongoDB backed sessions.
*/
MONGO,
MONGODB,
/**
* JDBC backed sessions.
......
......@@ -47,7 +47,7 @@ public class SessionAutoConfigurationMongoTests
@Test
public void defaultConfig() {
this.contextRunner.withPropertyValues("spring.session.store-type=mongo")
this.contextRunner.withPropertyValues("spring.session.store-type=mongodb")
.withConfiguration(AutoConfigurations.of(
EmbeddedMongoAutoConfiguration.class,
MongoAutoConfiguration.class, MongoDataAutoConfiguration.class))
......@@ -73,8 +73,8 @@ public class SessionAutoConfigurationMongoTests
.withConfiguration(AutoConfigurations.of(
EmbeddedMongoAutoConfiguration.class,
MongoAutoConfiguration.class, MongoDataAutoConfiguration.class))
.withPropertyValues("spring.session.store-type=mongo",
"spring.session.mongo.collection-name=foo")
.withPropertyValues("spring.session.store-type=mongodb",
"spring.session.mongodb.collection-name=foo")
.run(validateSpringSessionUsesMongo("foo"));
}
......
......@@ -427,8 +427,8 @@ content into your application; rather pick only the properties that you need.
spring.session.jdbc.schema=classpath:org/springframework/session/jdbc/schema-@@platform@@.sql # Path to the SQL file to use to initialize the database schema.
spring.session.jdbc.table-name=SPRING_SESSION # Name of database table used to store sessions.
# SPRING SESSION MONGO ({sc-spring-boot-autoconfigure}/session/MonogoSessionProperties.{sc-ext}[MongoSessionProperties])
spring.session.mongo.collection-name=sessions # Collection name used to store sessions.
# SPRING SESSION MONGODB ({sc-spring-boot-autoconfigure}/session/MongoSessionProperties.{sc-ext}[MongoSessionProperties])
spring.session.mongodb.collection-name=sessions # Collection name used to store sessions.
# SPRING SESSION REDIS ({sc-spring-boot-autoconfigure}/session/RedisSessionProperties.{sc-ext}[RedisSessionProperties])
spring.session.redis.flush-mode=on-save # Sessions flush mode.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment