Advertisement
Guest User

Untitled

a guest
Mar 14th, 2012
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 2.27 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3.     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4.     xmlns:aop="http://www.springframework.org/schema/aop"
  5.     xmlns:context="http://www.springframework.org/schema/context"
  6.     xmlns:lang="http://www.springframework.org/schema/lang"
  7.     xmlns:mongo="http://www.springframework.org/schema/data/mongo"
  8.     xmlns:p="http://www.springframework.org/schema/p"
  9.     xmlns:util="http://www.springframework.org/schema/util"
  10.     xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  11.         http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
  12.         http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
  13.         http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-3.0.xsd
  14.         http://www.springframework.org/schema/data/mongo http://www.springframework.org/schema/data/mongo/spring-mongo-1.0.xsd
  15.         http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd">
  16.  
  17.     <!-- default id = mongo, host = localhost, and port = 27017 no nested options
  18.         for now -->
  19.     <mongo:mongo>
  20.         <mongo:options />
  21.     </mongo:mongo>
  22.  
  23.     <!-- to translate any exceptions from @Repository annotated classes -->
  24.     <context:annotation-config />
  25.  
  26.     <mongo:db-factory dbname="qa" mongo-ref="mongo" />
  27.    
  28.     <mongo:mapping-converter base-package="kam.albert.domain.converter" />
  29.  
  30.     <util:constant id="writeConcern" static-field="com.mongodb.WriteConcern.SAFE" />
  31.     <util:constant id="writeResultChecking" static-field="org.springframework.data.mongodb.core.WriteResultChecking.EXCEPTION" />
  32.  
  33.     <!-- set the mapping converter to be used by the MongoTemplate -->
  34.     <bean id="ops" class="org.springframework.data.mongodb.core.MongoTemplate">
  35.         <constructor-arg name="mongoDbFactory" ref="mongoDbFactory" />
  36.         <constructor-arg name="mongoConverter" ref="mappingConverter" />
  37.        
  38.         <property name="writeConcern" ref="writeConcern" />
  39.         <property name="writeResultChecking" ref="writeResultChecking" />
  40.     </bean>
  41.  
  42.     <context:component-scan base-package="kam.albert.domain.test.case1" />
  43.    
  44. </beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement