<?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:context="http://www.springframework.org/schema/context"
		xmlns:mongo="http://www.springframework.org/schema/data/mongo"
		xsi:schemaLocation="http://www.springframework.org/schema/context
          http://www.springframework.org/schema/context/spring-context-4.0.xsd
          http://www.springframework.org/schema/data/mongo
          http://www.springframework.org/schema/data/mongo/spring-mongo-1.8.xsd
          http://www.springframework.org/schema/beans
          http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
	<context:property-placeholder location="classpath:mongodb.properties"/>
	<mongo:mongo-client id="mongo" replica-set="${mongo.url}">
		<mongo:client-options
		connections-per-host="${mongo.connectionsPerHost}"
		threads-allowed-to-block-for-connection-multiplier="${mongo.threadsAllowedToBlockForConnectionMultiplier}"
		connect-timeout="${mongo.connectTimeout}"
		max-wait-time="${mongo.maxWaitTime}"
		socket-keep-alive="${mongo.socketKeepAlive}"
		socket-timeout="${mongo.socketTimeout}"/>
	</mongo:mongo-client>
	<mongo:db-factory id="mongoDbFactory" dbname="MTNLog" mongo-ref="mongo"/>
	<bean id="mtlogMongoTemplate" class="org.springframework.data.mongodb.core.MongoTemplate">
		<constructor-arg name="mongoDbFactory" ref="mongoDbFactory"/>
	</bean>
	<mongo:mapping-converter base-package="com.lightinit.hsdataplatform.entity"/>
	<mongo:repositories base-package="com.lightinit.hsdataplatform.repository"/>
</beans>