From 35f9aa78aedce7358ad8bf05a39e72f7da3739ac Mon Sep 17 00:00:00 2001 From: jlilley Date: Mon, 10 Oct 2016 08:40:51 -0600 Subject: [PATCH] DATAMONGO-1508 - documentation for db-factory authentication-dbname attribute --- src/main/asciidoc/reference/mongodb.adoc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/main/asciidoc/reference/mongodb.adoc b/src/main/asciidoc/reference/mongodb.adoc index 6e4c4e7b02..2010f8b0c1 100644 --- a/src/main/asciidoc/reference/mongodb.adoc +++ b/src/main/asciidoc/reference/mongodb.adoc @@ -387,6 +387,20 @@ You can also provide the host and port for the underlying `com.mongodb.Mongo` in password="secret"/> ---- +If your mongodb authentication database differs from the target database, use the authentication-dbname attribute, as shown below. + +[source,xml] +---- + +---- + If you need to configure additional options on the `com.mongodb.Mongo` instance that is used to create a `SimpleMongoDbFactory` you can refer to an existing bean using the `mongo-ref` attribute as shown below. To show another common usage pattern, this listing shows the use of a property placeholder to parametrise the configuration and creating `MongoTemplate`. [source,xml]