Add MongoDB support to Spring Session sample
Closes gh-10374
This commit is contained in:
committed by
Stephane Nicoll
parent
f6cbee6b7f
commit
a39ccc2f8c
@@ -6,6 +6,7 @@ supports multiple session store types, including:
|
|||||||
* `Redis`
|
* `Redis`
|
||||||
* `JDBC`
|
* `JDBC`
|
||||||
* `Hazelcast`
|
* `Hazelcast`
|
||||||
|
* `MongoDB`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -46,3 +47,14 @@ automatically configure the underlying `HazelcastInstance`.
|
|||||||
|
|
||||||
TIP: Run sample application using Hazelcast session store with
|
TIP: Run sample application using Hazelcast session store with
|
||||||
`$mvn spring-boot:run -Phazelcast`.
|
`$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>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</profile>
|
</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>
|
</profiles>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
Reference in New Issue
Block a user