Skip to content

Commit b631fa1

Browse files
committed
Describe MongoClientSettingsBuilderCustomizer in the documentation
Closes gh-21696
1 parent be428ef commit b631fa1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3962,6 +3962,10 @@ For example, you might declare the following settings in your `application.prope
39623962
If you have defined your own `MongoClient`, it will be used to auto-configure a suitable `MongoDbFactory`.
39633963
Both `com.mongodb.MongoClient` and `com.mongodb.client.MongoClient` are supported.
39643964

3965+
The auto-configured `MongoClient` is created using `MongoClientSettings`.
3966+
To fine-tune its configuration, declare one or more `MongoClientSettingsBuilderCustomizer` beans.
3967+
Each will be called in order with the `MongoClientSettings.Builder` that is used to build the `MongoClientSettings`.
3968+
39653969
NOTE: If you use the Mongo 3.0 Java driver, `spring.data.mongodb.host` and `spring.data.mongodb.port` are not supported.
39663970
In such cases, `spring.data.mongodb.uri` should be used to provide all of the configuration.
39673971

0 commit comments

Comments
 (0)