Spring Session MongoDB 2.2.3

Spring Session MongoDB provides an API and implementations for managing a user’s session information stored in MongoDB by leveraging Spring Data MongoDB.
Features

Spring Session MongoDB provides the following features:

API and implementations for managing a user’s session

HttpSession - allows replacing the HttpSession in an application container (i.e. Tomcat) neutral way

Clustered Sessions - Spring Session makes it trivial to support clustered sessions without being tied to an application container specific solution.

Multiple Browser Sessions - Spring Session supports managing multiple users' sessions in a single browser instance (i.e. multiple authenticated accounts similar to Google).

RESTful APIs - Spring Session allows providing session ids in headers to work with RESTful APIs WebSocket - provides the ability to keep the HttpSession alive when receiving WebSocket messages

Adding Spring Session for MongoDB to your build

Spring Session MongoDB is part of a Maven BOM (Bill of Materials) used to coordinate versions between the core Spring Session project and this MongoDB extension. Each BOM release is called a release train and has a naming strategy, e.g. Apple-SR8, Bean-SR3, etc.
Using the BOM with Maven

With Maven, you need to import the BOM first:

org.springframework.session spring-session-bom Bean-SR3 pom import
This example is using Bean-SR3, but you plug in the release train version you need.

Notice the use of the <dependencyManagement> section and the import scope.

The BOM artifact is org.springframework.session:spring-session-bom, and is outside of Spring Session MongoDB.

Next, add your dependencies to the project without a :

org.springframework.session spring-session-data-mongodb

Using the BOM with Gradle

Since Gradle has no first-class support for Maven BOMs, you can use Spring’s Dependency management plugin.

Apply the plugin from Gradle Plugin Portal (update the version if needed):

plugins {
id ‘io.spring.dependency-management’ version ‘1.0.6.RELEASE’
}

Then use it to import the BOM:

dependencyManagement {
imports {
mavenBom ‘org.springframework.session:spring-session-bom:Bean-SR3’
}
}

Finally, add a dependency to the project without a version:

dependencies {
compile ‘org.springframework.session:spring-session-data-mongodb’
}

Spring Initializr
Quickstart Your Project
Bootstrap your application with Spring Initializr.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值