<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:mongo="http://www.springframework.org/schema/data/mongo"
	xsi:schemaLocation="http://www.springframework.org/schema/data/mongo https://www.springframework.org/schema/data/mongo/spring-mongo.xsd
		http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd">

	<mongo:db-factory id="first" mongo-client-ref="mongoClient" write-concern="ACKNOWLEDGED"/>

	<mongo:mongo-client id="mongoClient">
		<mongo:client-settings />
	</mongo:mongo-client>

	<mongo:db-factory id="with-connection-string" connection-string="mongodb://username:password@localhost/database" />

	<mongo:db-factory id="with-mongo-client-client-ref" mongo-client-ref="mongo.mongo-client" write-concern="ACKNOWLEDGED" />

    <mongo:mongo-client id="mongo.mongo-client">
        <mongo:client-settings application-name="spring-data-mongodb"/>
    </mongo:mongo-client>

</beans>
