server/java/renkan-web/src/main/webapp/WEB-INF/mongo-config.xml
author ymh <ymh.work@gmail.com>
Mon, 21 Jul 2014 14:48:01 +0200
changeset 316 242510015401
parent 87 server/src/main/webapp/WEB-INF/mongo-config.xml@6c810f746837
child 457 b38cf3d4cf1f
permissions -rw-r--r--
move java server project to sub folder

<?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:p="http://www.springframework.org/schema/p" 
    xmlns:mongo="http://www.springframework.org/schema/data/mongo"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:jpa="http://www.springframework.org/schema/data/jpa"
	xsi:schemaLocation="
	        http://www.springframework.org/schema/context
            http://www.springframework.org/schema/context/spring-context.xsd
	        http://www.springframework.org/schema/beans
	   		http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
   			http://www.springframework.org/schema/data/mongo
    		http://www.springframework.org/schema/data/mongo/spring-mongo-1.2.xsd
            http://www.springframework.org/schema/data/jpa
            http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsd">	
	
	<context:property-placeholder order="1000" ignore-unresolvable="true" ignore-resource-not-found="false" location="WEB-INF/renkan.properties"/>
	<context:property-placeholder  order="1" ignore-unresolvable="true" ignore-resource-not-found="true" location="classpath:renkan_run.properties"/>
	<!-- Default bean name is 'mongo' -->
	<mongo:mongo host="${mongodb.host.name}" port="${mongodb.host.port}" />
		
	<!-- Offers convenience methods and automatic mapping between MongoDB JSON documents and your domain classes. -->
  	<bean id="mongoTemplate" class="org.springframework.data.mongodb.core.MongoTemplate">
  	    <constructor-arg ref="mongo"/>
  		<constructor-arg value="${mongodb.db.name}"/>
  		<property name="writeResultChecking" value="EXCEPTION"/>
  	</bean>
  	
  	<mongo:repositories base-package="org.iri_research.renkan" factory-class="org.iri_research.renkan.repositories.RenkanRepositoryFactoryBean" />

</beans>