From 89c3d2ea123fcc2aef2e9f9a1e396af0281a88f8 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Wed, 5 Aug 2015 15:06:12 +0200 Subject: [PATCH] Improve MongoDB documentation Explicitly mention that `spring.data.mongodb.uri` can be used to customize additional settings such as replica set. Closes gh-2624 --- .../src/main/asciidoc/spring-boot-features.adoc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 6bfb832a9b0..8b3cc3da242 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -2505,9 +2505,16 @@ server using the URL `mongodb://localhost/test`: } ---- -You can set `spring.data.mongodb.uri` property to change the `url`, or alternatively -specify a `host`/`port`. For example, you might declare the following in your -`application.properties`: +You can set `spring.data.mongodb.uri` property to change the `url` and configure +additional settings such as the _replica set_: + +[source,properties,indent=0] +---- + spring.data.mongodb.uri=mongodb://user:secret@mongo1.example.com:12345,mongo2.example.com:23456/test +---- + +Alternatively, specify a `host`/`port`. For example, you might declare the following in +your `application.properties`: [source,properties,indent=0] ----