<?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/data/mongo http://www.springframework.org/schema/data/mongo/spring-mongo-1.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
mongoTemplate에 주입시키기 위해서 사용
<bean id="mongoTemplate" class="org.springframework.data.mongodb.core.MongoTemplate">
<constructor-arg ref="mongoDbFactory"/>
</bean>
MakeHttp 객체를 spring 에서 관리하기 위해서 등록 , 변수로 mongoTemplate 을 주입
<bean id="makeHttp" class="httpClient.MakeHttp">
<constructor-arg ref="mongoTemplate"></constructor-arg>
</bean>
mongoDbFactory 에 이름 , DB이름 , host , port , username , password 설정
<beans profile="default">
<mongo:db-factory id="mongoDbFactory" dbname="incatable" host="127.0.0.1" port="27017"
username="inca" password="1"/>
</beans>
</beans>