DATAMONGO-1508 - Document authentication-dbname attribute in db-factory.
Original pull request: #399.
This commit is contained in:
@@ -387,6 +387,20 @@ You can also provide the host and port for the underlying `com.mongodb.Mongo` in
|
|||||||
password="secret"/>
|
password="secret"/>
|
||||||
----
|
----
|
||||||
|
|
||||||
|
If your mongodb authentication database differs from the target database, use the authentication-dbname attribute, as shown below.
|
||||||
|
|
||||||
|
[source,xml]
|
||||||
|
----
|
||||||
|
<mongo:db-factory id="anotherMongoDbFactory"
|
||||||
|
host="localhost"
|
||||||
|
port="27017"
|
||||||
|
dbname="database"
|
||||||
|
username="joe"
|
||||||
|
password="secret"
|
||||||
|
authentication-dbname="admin"
|
||||||
|
/>
|
||||||
|
----
|
||||||
|
|
||||||
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`.
|
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]
|
[source,xml]
|
||||||
|
|||||||
Reference in New Issue
Block a user