Skip to content

Commit c096caa

Browse files
Provide context configuration hints for Spring Boot.
Closes: #3381
1 parent c794aca commit c096caa

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/main/asciidoc/reference/mapping.adoc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,15 @@ Also shown in the preceding example is a `LoggingEventListener`, which logs `Mon
352352

353353
NOTE: `AbstractMongoClientConfiguration` creates a `MongoTemplate` instance and registers it with the container under the name `mongoTemplate`.
354354

355-
356355
The `base-package` property tells it where to scan for classes annotated with the `@org.springframework.data.mongodb.core.mapping.Document` annotation.
357356

357+
[TIP]
358+
====
359+
If you want to rely on https://spring.io/projects/spring-boot[Spring Boot] to bootstrap Data MongoDB, but still want to override certain aspects of the configuration, you may want to expose beans of that type.
360+
For custom conversions you may eg. choose to register a bean of type `MongoCustomConversions` that will be picked up the by the Boot infrastructure.
361+
To learn more about this please make sure to read the Spring Boot https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#data.nosql.mongodb[Reference Documentation].
362+
====
363+
358364
[[mapping-usage]]
359365
== Metadata-based Mapping
360366

0 commit comments

Comments
 (0)