From a39ccc2f8ccb2c707a9fceba1b9c1db3bfdb3eac Mon Sep 17 00:00:00 2001 From: Vedran Pavic Date: Thu, 21 Sep 2017 20:17:44 +0200 Subject: [PATCH] Add MongoDB support to Spring Session sample Closes gh-10374 --- .../spring-boot-sample-session/README.adoc | 12 ++++++++++++ .../spring-boot-sample-session/pom.xml | 13 +++++++++++++ 2 files changed, 25 insertions(+) diff --git a/spring-boot-samples/spring-boot-sample-session/README.adoc b/spring-boot-samples/spring-boot-sample-session/README.adoc index 80881ca97d..6349857325 100644 --- a/spring-boot-samples/spring-boot-sample-session/README.adoc +++ b/spring-boot-samples/spring-boot-sample-session/README.adoc @@ -6,6 +6,7 @@ supports multiple session store types, including: * `Redis` * `JDBC` * `Hazelcast` +* `MongoDB` @@ -46,3 +47,14 @@ automatically configure the underlying `HazelcastInstance`. TIP: Run sample application using Hazelcast session store with `$mvn spring-boot:run -Phazelcast`. + + + +=== MongoDB +Add `org.springframework.session:spring-session-data-mongodb` and +`spring-boot-starter-data-mongodb` dependencies to the project and make sure it is +configured properly (by default, a MongoDB instance with the default settings is expected +on your local box). + +TIP: Run sample application using MongoDB session store using +`$mvn spring-boot:run -Pmongodb`. diff --git a/spring-boot-samples/spring-boot-sample-session/pom.xml b/spring-boot-samples/spring-boot-sample-session/pom.xml index 4793836a44..379d80dcb6 100644 --- a/spring-boot-samples/spring-boot-sample-session/pom.xml +++ b/spring-boot-samples/spring-boot-sample-session/pom.xml @@ -94,5 +94,18 @@ + + mongodb + + + org.springframework.session + spring-session-data-mongodb + + + org.springframework.boot + spring-boot-starter-data-mongodb + + +