Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?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:aop="http://www.springframework.org/schema/aop"
- xmlns:context="http://www.springframework.org/schema/context"
- xmlns:lang="http://www.springframework.org/schema/lang"
- xmlns:mongo="http://www.springframework.org/schema/data/mongo"
- xmlns:p="http://www.springframework.org/schema/p"
- xmlns:util="http://www.springframework.org/schema/util"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
- http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-3.0.xsd
- http://www.springframework.org/schema/data/mongo http://www.springframework.org/schema/data/mongo/spring-mongo-1.0.xsd
- http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd">
- <!-- default id = mongo, host = localhost, and port = 27017 no nested options
- for now -->
- <mongo:mongo>
- <mongo:options />
- </mongo:mongo>
- <!-- to translate any exceptions from @Repository annotated classes -->
- <context:annotation-config />
- <mongo:db-factory dbname="qa" mongo-ref="mongo" />
- <mongo:mapping-converter base-package="kam.albert.domain.converter" />
- <util:constant id="writeConcern" static-field="com.mongodb.WriteConcern.SAFE" />
- <util:constant id="writeResultChecking" static-field="org.springframework.data.mongodb.core.WriteResultChecking.EXCEPTION" />
- <!-- set the mapping converter to be used by the MongoTemplate -->
- <bean id="ops" class="org.springframework.data.mongodb.core.MongoTemplate">
- <constructor-arg name="mongoDbFactory" ref="mongoDbFactory" />
- <constructor-arg name="mongoConverter" ref="mappingConverter" />
- <property name="writeConcern" ref="writeConcern" />
- <property name="writeResultChecking" ref="writeResultChecking" />
- </bean>
- <context:component-scan base-package="kam.albert.domain.test.case1" />
- </beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement