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
of the Spring Data MongoDB documentation, and the :ref:`Compatibility
@@ -112,7 +120,7 @@ of the Spring Data MongoDB documentation, and the :ref:`Compatibility
112
120
113
121
If you used the `Spring Initializr <https://start.spring.io/>`__ or a clone of the :github:`Spring Boot sample project <spring-guides/gs-spring-boot>` to create your project, versioning compatibility has already been accounted for, and the ``spring-boot-starter-data-mongodb`` component will already be included in your ``pom.xml`` file.
114
122
115
-
Add the following dependencies to your ``pom.xml``:
123
+
Add the following dependencies to your ``pom.xml`` file:
116
124
117
125
.. code-block:: xml
118
126
@@ -133,17 +141,17 @@ objects to use in the bulk write operation.
133
141
Configure your MongoClient
134
142
~~~~~~~~~~~~~~~~~~~~~~~~~~
135
143
136
-
The ``MongoConfig`` class contains the configuration for the ``MongoClient``
137
-
that will allow the Spring Data framework to interact with the MongoDB server,
144
+
The ``MongoConfig`` class contains the configuration for the ``MongoClient`` object
145
+
that will allow the Spring Data framework to interact with the MongoDB Server,
138
146
and sets other configuration options. For more information about configuration
139
147
options, see the :ref:`Specify Connection Options <specify-mongoclient-settings>`
140
148
page of this guide.
141
149
142
150
This application uses ``@Configuration`` annotations for classes, ``@Bean``
143
151
annotations for methods, and ``@Value`` annotations for parameter conversion.
144
-
These annotations allow the Spring IoC container to manage objects. For a
145
-
detailed explanation of these annotations, see the following sections of the
146
-
Spring Data framework guide:
152
+
These annotations allow the Spring IoC (Inversion of Control) container to
153
+
manage objects. For a detailed explanation of these annotations, see the
154
+
following sections of the Spring Data framework guide:
147
155
148
156
- ``@Configuration`` and ``@Bean`` annotations: `Java-based Container
149
157
Configuration
@@ -158,7 +166,6 @@ template classes to set up your MongoDB connection:
158
166
:start-after: // start-mongoconfig
159
167
:end-before: // end-mongoconfig
160
168
:language: java
161
-
:dedent:
162
169
163
170
.. note:: API vs Interface
164
171
@@ -173,7 +180,6 @@ database name (``mongodb.database``), and bulk operation count (``documentCount`
173
180
:start-after: # start-mongoconfig-properties
174
181
:end-before: # end-mongoconfig-properties
175
182
:language: console
176
-
:dedent:
177
183
178
184
This tutorial uses a database named ``bulk``, and creates 25000 documents to save. Replace the ``<connection
179
185
string>`` placeholder with a connection string for your Atlas deployment. For
@@ -191,7 +197,7 @@ documents, see the `Mapping Annotation Overview
191
197
section of the Spring Data MongoDB documentation.
192
198
193
199
The ``@Id`` annotation in the following code indicates that the ``id`` field
194
-
maps to the ``_id`` field which is used as a unique identifier in MongoDB documents. You can choose any field of
200
+
maps to the ``_id`` field, which is used as a unique identifier in MongoDB documents. You can choose any field of
195
201
any type, except arrays, to be the unique identifier. For more information, see
196
202
the `How the _id field is handled in the mapping layer
0 commit comments