server/src/main/webapp/WEB-INF/mongo-config.xml
author veltr
Wed, 13 Mar 2013 10:19:24 +0100
changeset 73 cc9deb3b3e13
parent 45 37c9a17c3284
child 76 523f0647513e
permissions -rw-r--r--
Added simple Resource bin

<?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/beans 
	   		http://www.springframework.org/schema/beans/spring-beans.xsd
   			http://www.springframework.org/schema/data/mongo
    		http://www.springframework.org/schema/data/mongo/spring-mongo.xsd
    		http://www.springframework.org/schema/context
            http://www.springframework.org/schema/context/spring-context.xsd
            http://www.springframework.org/schema/data/jpa
            http://www.springframework.org/schema/data/jpa/spring-jpa.xsd">	
	<!-- Default bean name is 'mongo' -->
	<mongo:mongo host="localhost" port="27017"/>
		
	<!-- 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="renkan"/>
  		<property name="writeResultChecking" value="EXCEPTION"/>
  	</bean>
  	
  	<mongo:repositories base-package="org.iri_research.renkan" factory-class="org.iri_research.renkan.repositories.RenkanRepositoryFactoryBean" />
  	  	
</beans>