Requirements

Spring Data MongoDB 4.x 二进制文件需要 JDK 17 级及更高版本,以及 Spring Framework {springVersion} 及更高版本。

The Spring Data MongoDB 4.x binaries require JDK level 17 and above and Spring Framework {springVersion} and above.

在数据库和驱动程序方面,至少需要 MongoDB 的 4.x 版本以及兼容的 MongoDB Java 驱动程序(4.x 或 5.x)。

In terms of database and driver, you need at least version 4.x of MongoDB and a compatible MongoDB Java Driver (4.x or 5.x).

Compatibility Matrix

以下兼容性矩阵总结了 Spring Data 版本至 MongoDB 驱动程序/数据库版本。数据库版本显示了支持 Spring Data 测试套件的最高版本服务器。除非你的应用程序使用受 changes in the MongoDB server 影响的功能,否则可以使用较新的服务器版本。有关驱动程序和服务器版本兼容性,另请参阅 official MongoDB driver compatibility matrix

The following compatibility matrix summarizes Spring Data versions to MongoDB driver/database versions. Database versions show the highest supported server version that pass the Spring Data test suite. You can use newer server versions unless your application uses functionality that is affected by changes in the MongoDB server. See also the official MongoDB driver compatibility matrix for driver- and server version compatibility.

Spring Data Release Train Spring Data MongoDB Driver Version Server Version

2024.0

4.3.x

4.11.x & 5.x

6.x

2023.1

4.1.x

4.9.x

7.0.x

2023.0

4.1.x

4.9.x

6.0.x

2022.0

4.0.x

4.7.x

6.0.x

2021.2

3.4.x

4.6.x

5.0.x

2021.1

3.3.x

4.4.x

5.0.x

2021.0

3.2.x

4.1.x

4.4.x

2020.0

3.1.x

4.1.x

4.4.x

Neumann

3.0.x

4.0.x

4.4.x

Moore

2.2.x

3.11.x/Reactive Streams 1.12.x

4.2.x

Lovelace

2.1.x

3.8.x/Reactive Streams 1.9.x

4.0.x

Relevant Changes in MongoDB 4.4

  • Fields list must not contain text search score property when no $text criteria present. See also $text operator

  • Sort must not be an empty document when running map reduce.

Relevant Changes in MongoDB 4.2