You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Spring Data MongoDB project applies core Spring concepts to the development of solutions that use the MongoDB document style data store. We provide a "`template`" as a high-level abstraction for storing and querying documents. You may notice similarities to the JDBC support provided by the Spring Framework.
5
-
6
-
This document is the reference guide for Spring Data - MongoDB Support. It explains MongoDB module concepts and semantics and syntax for various store namespaces.
7
-
8
-
This section provides some basic introduction to Spring and Document databases. The rest of the document refers only to Spring Data MongoDB features and assumes the user is familiar with MongoDB and Spring concepts.
9
-
10
-
[[get-started:first-steps:spring]]
11
-
== Learning Spring
12
-
13
-
Spring Data uses Spring framework's link:{springDocsUrl}/core.html[core] functionality, including:
While you need not know the Spring APIs, understanding the concepts behind them is important. At a minimum, the idea behind Inversion of Control (IoC) should be familiar, and you should be familiar with whatever IoC container you choose to use.
22
-
23
-
The core functionality of the MongoDB support can be used directly, with no need to invoke the IoC services of the Spring Container. This is much like `JdbcTemplate`, which can be used "'standalone'" without any other services of the Spring container. To leverage all the features of Spring Data MongoDB, such as the repository support, you need to configure some parts of the library to use Spring.
24
-
25
-
To learn more about Spring, you can refer to the comprehensive documentation that explains the Spring Framework in detail. There are a lot of articles, blog entries, and books on the subject. See the Spring framework https://spring.io/docs[home page] for more information.
26
-
27
-
[[get-started:first-steps:nosql]]
28
-
== Learning NoSQL and Document databases
29
-
NoSQL stores have taken the storage world by storm. It is a vast domain with a plethora of solutions, terms, and patterns (to make things worse, even the term itself has multiple https://www.google.com/search?q=nosoql+acronym[meanings]). While some of the principles are common, you must be familiar with MongoDB to some degree. The best way to get acquainted is to read the documentation and follow the examples. It usually does not take more then 5-10 minutes to go through them and, especially if you are coming from an RDMBS-only background, these exercises can be an eye opener.
30
-
31
-
The starting point for learning about MongoDB is https://www.mongodb.org/[www.mongodb.org]. Here is a list of other useful resources:
32
-
33
-
* The https://docs.mongodb.org/manual/[manual] introduces MongoDB and contains links to getting started guides, reference documentation, and tutorials.
34
-
* Visit https://learn.mongodb.com/[MongoDB University] for free training material and online courses.
35
-
* MongoDB https://docs.mongodb.org/ecosystem/drivers/java/[Java Language Center].
36
-
* Several https://www.mongodb.org/books[books] you can purchase.
37
-
* Karl Seguin's online book: https://openmymind.net/mongodb.pdf[The Little MongoDB Book].
38
-
39
1
[[requirements]]
40
-
== Requirements
2
+
= Requirements
41
3
42
4
The Spring Data MongoDB 4.x binaries require JDK level 17 and above and https://spring.io/docs[Spring Framework] {springVersion} and above.
43
5
44
-
In terms of document stores, you need at least version 3.6 of https://www.mongodb.org/[MongoDB], though we recommend a more recent version.
6
+
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 (4.x or 5.x).
45
7
46
8
[[compatibility.matrix]]
47
-
=== Compatibility Matrix
9
+
== Compatibility Matrix
48
10
49
11
The following compatibility matrix summarizes Spring Data versions to MongoDB driver/database versions.
50
12
Database versions show the highest supported server version that pass the Spring Data test suite.
@@ -59,6 +21,16 @@ See also the https://www.mongodb.com/docs/drivers/java/sync/current/compatibilit
59
21
|Driver Version
60
22
|Server Version
61
23
24
+
|2024.0
25
+
|4.3.x
26
+
|4.11.x & 5.x
27
+
|6.x
28
+
29
+
|2023.1
30
+
|4.1.x
31
+
|4.9.x
32
+
|7.0.x
33
+
62
34
|2023.0
63
35
|4.1.x
64
36
|4.9.x
@@ -108,32 +80,13 @@ See also the https://www.mongodb.com/docs/drivers/java/sync/current/compatibilit
108
80
109
81
[[compatibility.changes]]
110
82
[[compatibility.changes-4.4]]
111
-
==== Relevant Changes in MongoDB 4.4
83
+
=== Relevant Changes in MongoDB 4.4
112
84
113
85
* 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]
114
86
* Sort must not be an empty document when running map reduce.
115
87
116
88
[[compatibility.changes-4.2]]
117
-
==== Relevant Changes in MongoDB 4.2
89
+
=== Relevant Changes in MongoDB 4.2
118
90
119
91
* 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`]
120
92
* 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`]
121
-
122
-
[[get-started:help]]
123
-
== Additional Help Resources
124
-
125
-
Learning a new framework is not always straightforward.
126
-
In this section, we try to provide what we think is an easy-to-follow guide for starting with the Spring Data MongoDB module.
127
-
However, if you encounter issues or you need advice, feel free to use one of the following links:
128
-
129
-
[[get-started:help:community]]
130
-
Community Forum :: Spring Data on https://stackoverflow.com/questions/tagged/spring-data[Stack Overflow] is a tag for all Spring Data (not just Document) users to share information and help each other.
131
-
Note that registration is needed only for posting.
132
-
133
-
[[get-started:help:professional]]
134
-
Professional Support :: Professional, from-the-source support, with guaranteed response time, is available from https://pivotal.io/[Pivotal Software, Inc.], the company behind Spring Data and Spring.
135
-
136
-
[[get-started:up-to-date]]
137
-
== Following Development
138
-
139
-
For information on the Spring Data Mongo source code repository, nightly builds, and snapshot artifacts, see the Spring Data Mongo https://spring.io/projects/spring-data-mongodb/[homepage]. You can help make Spring Data best serve the needs of the Spring community by interacting with developers through the Community on https://stackoverflow.com/questions/tagged/spring-data[Stack Overflow]. To follow developer activity, look for the mailing list information on the Spring Data Mongo https://spring.io/projects/spring-data-mongodb/[homepage]. If you encounter a bug or want to suggest an improvement, please create a ticket on the Spring Data https://github.com/spring-projects/spring-data-mongodb/issues[issue tracker]. To stay up to date with the latest news and announcements in the Spring eco system, subscribe to the Spring Community https://spring.io[Portal]. You can also follow the Spring https://spring.io/blog[blog] or the project team on Twitter (https://twitter.com/SpringData[SpringData]).
0 commit comments