Skip to content

This product enables applications to use Spring Session with MongoDB and provides a SessionRepository implementation backed by MongoDB using Spring Data MongoDB.

License

Notifications You must be signed in to change notification settings

mongodb/mongo-spring-session

Repository files navigation

MongoDB Spring Session extension

This product enables applications to use Spring Session with MongoDB and provides a SessionRepository implementation backed by MongoDB using Spring Data MongoDB.

Overview

Spring Session provides an API and implementations for managing a user's session information, while also making it trivial to support clustered sessions without being tied to an application container specific solution. It also provides transparent integration with:

  • HttpSession - allows replacing the HttpSession in an application container (i.e. Tomcat) neutral way, with support for providing session IDs in headers to work with RESTful APIs.
  • WebSocket - provides the ability to keep the HttpSession alive when receiving WebSocket messages
  • WebSession - allows replacing the Spring WebFlux's WebSession in an application container neutral way.

Migrating from spring-session-data-mongodb

The API namespace has changed from org.springframework.session.data.mongo to org.mongodb.spring.session.

As per the wider changes in the Spring framework, Jackson 2 support is deprecated and Jackson 3 support has been added:

Jackson Json support:

  • Jackson 2 support is now deprecated and is available via Jackson2MongoSessionConverter
  • Jackson 3 support is now available via JacksonMongoSessionConverter

Support / Feedback

For issues with, questions about, or feedback for the MongoDB Java, Kotlin, and Scala drivers, please look into our support channels. Please do not email any of the driver developers directly with issues or questions - you're more likely to get an answer on StackOverflow.

At a minimum, please include in your description the exact version of the library and any dependencies that you are using.

Bugs / Feature Requests

Think you’ve found a bug? Want to see a new feature in the MongoDB Spring Session? Please open a case in our issue management tool, JIRA:

Bug reports in JIRA for the extension and the Core Server (i.e. SERVER) project are public.

If you’ve identified a security vulnerability in the library or any other MongoDB project, please report it according to the instructions here.

Versioning

We follow semantic versioning when releasing.

Binaries

Binaries and dependency information for Maven, Gradle, Ivy and others can be found at https://central.sonatype.com/search.

Example for Maven:

<dependency>
    <groupId>org.mongodb</groupId>
    <artifactId>mongo-spring-session</artifactId>
    <version>x.y.z</version>
</dependency>

Snapshot builds are also published regulary via Sonatype.

Example for Maven:

<repositories>
    <repository>
        <name>Central Portal Snapshots</name>
        <id>central-portal-snapshots</id>
        <url>https://central.sonatype.com/repository/maven-snapshots/</url>
        <releases>
            <enabled>false</enabled>
        </releases>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
</repositories>

Testing

This project uses separate directories for unit and integration tests:

Gradle Tasks

All checks
./gradlew clean check
Unit Tests only
./gradlew clean test
Integration Tests only
./gradlew clean integrationTest

Integration tests require a MongoDB deployment to be available

CI/CD

This project uses evergreen, a distributed continuous integration system from MongoDB. The evergreen configuration is in the .evergreen directory.

About

This product enables applications to use Spring Session with MongoDB and provides a SessionRepository implementation backed by MongoDB using Spring Data MongoDB.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 9