Remove support for embedded MongoDB

This commit removes auto-configuration and dependency management
for Flapdoodle embedded MongoDB in favor of the Spring Boot support
provided by Flapdoodle.

Closes gh-30863
This commit is contained in:
Scott Frederick
2022-05-06 15:08:35 -05:00
parent 4a8e48f07a
commit 7e089a6b81
24 changed files with 8 additions and 889 deletions

View File

@@ -136,27 +136,6 @@ TIP: For complete details of Spring Data MongoDB, including its rich object mapp
[[data.nosql.mongodb.embedded]]
==== Embedded Mongo
Spring Boot offers auto-configuration for https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo[Embedded Mongo].
To use it in your Spring Boot application, add a dependency on `de.flapdoodle.embed:de.flapdoodle.embed.mongo` and set the configprop:spring.mongodb.embedded.version[] property to match the version of MongoDB that your application will use in production.
NOTE: The default download configuration allows access to most of the versions listed in {embedded-mongo-code}/src/main/java/de/flapdoodle/embed/mongo/distribution/Version.java[Embedded Mongo's `Version` class] as well as some others.
Configuring an inaccessible version will result in an error when attempting to download the server.
Such an error can be corrected by defining an appropriately configured `DownloadConfigBuilderCustomizer` bean.
The port that Mongo listens on can be configured by setting the configprop:spring.data.mongodb.port[] property.
To use a randomly allocated free port, use a value of 0.
The `MongoClient` created by `MongoAutoConfiguration` is automatically configured to use the randomly allocated port.
NOTE: If you do not configure a custom port, the embedded support uses a random port (rather than 27017) by default.
If you have SLF4J on the classpath, the output produced by Mongo is automatically routed to a logger named `org.springframework.boot.autoconfigure.mongo.embedded.EmbeddedMongo`.
You can declare your own `IMongodConfig` and `IRuntimeConfig` beans to take control of the Mongo instance's configuration and logging routing.
The download configuration can be customized by declaring a `DownloadConfigBuilderCustomizer` bean.
[[data.nosql.neo4j]]
=== Neo4j
https://neo4j.com/[Neo4j] is an open-source NoSQL graph database that uses a rich data model of nodes connected by first class relationships, which is better suited for connected big data than traditional RDBMS approaches.