Skip to content

Commit

Permalink
Add MongoDB support to Spring Session sample
Browse files Browse the repository at this point in the history
Closes gh-10374
  • Loading branch information
vpavic authored and snicoll committed Sep 22, 2017
1 parent f6cbee6 commit a39ccc2
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spring-boot-samples/spring-boot-sample-session/README.adoc
Expand Up @@ -6,6 +6,7 @@ supports multiple session store types, including:
* `Redis`
* `JDBC`
* `Hazelcast`
* `MongoDB`
Expand Down Expand Up @@ -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`.
13 changes: 13 additions & 0 deletions spring-boot-samples/spring-boot-sample-session/pom.xml
Expand Up @@ -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>

0 comments on commit a39ccc2

Please sign in to comment.