Remove default spring.mongodb.embedded.version

See gh-27108
This commit is contained in:
bono007
2021-06-27 09:17:18 -05:00
committed by Andy Wilkinson
parent 870c64f849
commit d16ecab24b
8 changed files with 46 additions and 25 deletions

View File

@@ -151,6 +151,13 @@ TIP: For complete details of Spring Data MongoDB, including its rich object mapp
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`.
The version of the MongoDB server **must** be configured by setting the configprop:spring.data.mongodb.embedded.version property.
NOTE: The default download configuration allows access to most of the versions listed in https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo/blob/de.flapdoodle.embed.mongo-3.0.0/src/main/java/de/flapdoodle/embed/mongo/distribution/Version.java[Version.java]
as well as some others. Inaccessible versions result in error when attempting to download the server. The download configuration may be adjusted to handle the desired version.
The download configuration can be customized by declaring a `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.
@@ -160,8 +167,6 @@ NOTE: If you do not configure a custom port, the embedded support uses a random
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]]