| <?xml version="1.0" encoding="UTF-8"?> |
| <beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| xmlns:aop="http://www.springframework.org/schema/aop" |
| xmlns:context="http://www.springframework.org/schema/context" |
| xmlns:mongo="http://www.springframework.org/schema/data/mongo" |
| xmlns="http://www.springframework.org/schema/beans" |
| xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd |
| http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd |
| http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd |
| http://www.springframework.org/schema/data/mongo http://www.springframework.org/schema/data/mongo/spring-mongo.xsd" > |
| |
| <context:property-placeholder location="classpath:mongodb.properties" /> |
| |
| <!-- tag::configuration[] --> |
| <mongo:db-factory dbname="recipes" host="${mongodb.host:localhost}:${mongodb.port:27017}" /><!--1--> |
| <mongo:repositories base-package="org.eclipse.virgo.samples.recipe.data.mongodb" /><!--2--> |
| |
| <bean id="mongoTemplate" class="org.springframework.data.mongodb.core.MongoTemplate"><!--3--> |
| <constructor-arg ref="mongoDbFactory" /> |
| </bean> |
| |
| <context:component-scan base-package="org.eclipse.virgo.samples.recipe.data.mongodb" /><!--4--> |
| <!-- end::configuration[] --> |
| </beans> |