[[requirements]]
= Requirements

The Spring Data MongoDB 4.x binaries require JDK level 17 and above and https://spring.io/docs[Spring Framework] {springVersion} and above.

In terms of database and driver, you need at least version 4.x of https://www.mongodb.org/[MongoDB] and a compatible MongoDB Java Driver (5.6+).

[[compatibility.matrix]]
== Compatibility Matrix

The following compatibility matrix summarizes Spring Data versions to MongoDB driver/database versions.
Database versions show server generations that pass the Spring Data test suite.
You can use newer server versions unless your application uses functionality that is affected by xref:preface.adoc#compatibility.changes[changes in the MongoDB server].
See also the https://www.mongodb.com/docs/drivers/java/sync/current/compatibility/[official MongoDB driver compatibility matrix] for driver- and server version compatibility.

====
[cols="h,m,m,m", options="header"]
|===

|Spring Data Release Train
|Spring Data MongoDB
|Driver Version
|Database Versions

|2025.0
|4.5.x
|5.6.x
|6.x to 8.x

|2024.1
|4.4.x
|5.2.x
|4.4.x to 8.x

|2024.0
|4.3.x
|4.11.x & 5.x
|4.4.x to 7.x

|2023.1
|4.2.x
|4.9.x
|4.4.x to 7.x

|2023.0 (*)
|4.1.x
|4.9.x
|4.4.x to 6.x

|2022.0 (*)
|4.0.x
|4.7.x
|4.4.x to 6.x

|2021.2 (*)
|3.4.x
|4.6.x
|4.4.x to 5.0.x

|2021.1 (*)
|3.3.x
|4.4.x
|4.4.x to 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

|===
(*) https://spring.io/projects/spring-data-mongodb#support[End of OSS Support]
====

[[compatibility.changes]]
[[compatibility.changes-4.4]]
=== Relevant Changes in MongoDB 4.4

* Fields list must not contain text search score property when no `$text` criteria present. See also https://docs.mongodb.com/manual/reference/operator/query/text/[`$text` operator]
* Sort must not be an empty document when running map reduce.

[[compatibility.changes-4.2]]
=== Relevant Changes in MongoDB 4.2

* Removal of `geoNear` command. See also https://docs.mongodb.com/manual/release-notes/4.2-compatibility/#remove-support-for-the-geonear-command[Removal of `geoNear`]
* Removal of `eval` command. See also https://docs.mongodb.com/manual/release-notes/4.2-compatibility/#remove-support-for-the-eval-command[Removal of `eval`]
