|
|
|
@ -4,10 +4,12 @@ |
|
|
|
xmlns:tx="http://www.springframework.org/schema/tx" |
|
|
|
xmlns:tx="http://www.springframework.org/schema/tx" |
|
|
|
xmlns:jdbc="http://www.springframework.org/schema/jdbc" |
|
|
|
xmlns:jdbc="http://www.springframework.org/schema/jdbc" |
|
|
|
xmlns:context="http://www.springframework.org/schema/context" |
|
|
|
xmlns:context="http://www.springframework.org/schema/context" |
|
|
|
xsi:schemaLocation="http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd |
|
|
|
xmlns:mongo="http://www.springframework.org/schema/data/mongo" |
|
|
|
|
|
|
|
xsi:schemaLocation="http://www.springframework.org/schema/data/mongo http://www.springframework.org/schema/data/mongo/spring-mongo.xsd |
|
|
|
|
|
|
|
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd |
|
|
|
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd |
|
|
|
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-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/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd |
|
|
|
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"> |
|
|
|
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"> |
|
|
|
|
|
|
|
|
|
|
|
<context:spring-configured/> |
|
|
|
<context:spring-configured/> |
|
|
|
|
|
|
|
|
|
|
|
@ -15,6 +17,8 @@ |
|
|
|
<context:exclude-filter expression="org.springframework.stereotype.Controller" type="annotation"/> |
|
|
|
<context:exclude-filter expression="org.springframework.stereotype.Controller" type="annotation"/> |
|
|
|
</context:component-scan> |
|
|
|
</context:component-scan> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<mongo:mapping-converter/> |
|
|
|
|
|
|
|
|
|
|
|
<!-- Mongo config --> |
|
|
|
<!-- Mongo config --> |
|
|
|
<bean id="mongo" class="org.springframework.data.document.mongodb.MongoFactoryBean"> |
|
|
|
<bean id="mongo" class="org.springframework.data.document.mongodb.MongoFactoryBean"> |
|
|
|
<property name="host" value="localhost"/> |
|
|
|
<property name="host" value="localhost"/> |
|
|
|
@ -24,6 +28,8 @@ |
|
|
|
<bean id="mongoTemplate" class="org.springframework.data.document.mongodb.MongoTemplate"> |
|
|
|
<bean id="mongoTemplate" class="org.springframework.data.document.mongodb.MongoTemplate"> |
|
|
|
<constructor-arg name="mongo" ref="mongo"/> |
|
|
|
<constructor-arg name="mongo" ref="mongo"/> |
|
|
|
<constructor-arg name="databaseName" value="test"/> |
|
|
|
<constructor-arg name="databaseName" value="test"/> |
|
|
|
|
|
|
|
<constructor-arg name="defaultCollectionName" value="cross-store"/> |
|
|
|
|
|
|
|
<constructor-arg name="mongoConverter" ref="mappingConverter"/> |
|
|
|
</bean> |
|
|
|
</bean> |
|
|
|
|
|
|
|
|
|
|
|
<bean class="org.springframework.data.document.mongodb.MongoExceptionTranslator"/> |
|
|
|
<bean class="org.springframework.data.document.mongodb.MongoExceptionTranslator"/> |
|
|
|
|