Add MongoDB support to Spring Session sample

Closes gh-10374
pull/10374/merge
Vedran Pavic 7 years ago committed by Stephane Nicoll
parent f6cbee6b7f
commit a39ccc2f8c

@ -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`.

@ -94,5 +94,18 @@
</dependency>
</dependencies>
</profile>
<profile>
<id>mongodb</id>
<dependencies>
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session-data-mongodb</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
</dependencies>
</profile>
</profiles>
</project>

Loading…
Cancel
Save