|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
2 | 2 | <beans xmlns="http://www.springframework.org/schema/beans"
|
3 |
| - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
4 |
| - xmlns:tx="http://www.springframework.org/schema/tx" |
5 |
| - xmlns:jdbc="http://www.springframework.org/schema/jdbc" |
6 |
| - xmlns:context="http://www.springframework.org/schema/context" |
7 |
| - xsi:schemaLocation="http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd |
| 3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 4 | + xmlns:tx="http://www.springframework.org/schema/tx" |
| 5 | + xmlns:jdbc="http://www.springframework.org/schema/jdbc" |
| 6 | + xmlns:context="http://www.springframework.org/schema/context" |
| 7 | + xmlns:mongo="http://www.springframework.org/schema/data/mongo" |
| 8 | + xsi:schemaLocation="http://www.springframework.org/schema/data/mongo http://www.springframework.org/schema/data/mongo/spring-mongo.xsd |
| 9 | + http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd |
8 | 10 | http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
9 |
| - http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd |
10 |
| - http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"> |
| 11 | + http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd |
| 12 | + http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"> |
11 | 13 |
|
12 | 14 | <context:spring-configured/>
|
13 | 15 |
|
14 | 16 | <context:component-scan base-package="org.springframework.persistence.test">
|
15 | 17 | <context:exclude-filter expression="org.springframework.stereotype.Controller" type="annotation"/>
|
16 | 18 | </context:component-scan>
|
17 | 19 |
|
| 20 | + <mongo:mapping-converter/> |
| 21 | + |
18 | 22 | <!-- Mongo config -->
|
19 | 23 | <bean id="mongo" class="org.springframework.data.document.mongodb.MongoFactoryBean">
|
20 | 24 | <property name="host" value="localhost"/>
|
|
24 | 28 | <bean id="mongoTemplate" class="org.springframework.data.document.mongodb.MongoTemplate">
|
25 | 29 | <constructor-arg name="mongo" ref="mongo"/>
|
26 | 30 | <constructor-arg name="databaseName" value="test"/>
|
| 31 | + <constructor-arg name="defaultCollectionName" value="cross-store"/> |
| 32 | + <constructor-arg name="mongoConverter" ref="mappingConverter"/> |
27 | 33 | </bean>
|
28 | 34 |
|
29 | 35 | <bean class="org.springframework.data.document.mongodb.MongoExceptionTranslator"/>
|
|
0 commit comments