Skip to content

Commit

Permalink
Fixed xml mongoConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-semenyuk committed Oct 14, 2015
1 parent 27e649a commit 919123b
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions spring-data-mongodb/src/main/resources/mongoConfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,19 @@
http://www.springframework.org/schema/context/spring-context-3.2.xsd"
>
<context:annotation-config/>

<bean id="mongo" class="org.springframework.data.mongodb.core.MongoFactoryBean">
<property name="host" value="localhost"/>
</bean>
<mongo:mongo id="mongo" host="localhost" />

<mongo:db-factory id="mongoDbFactory" dbname="test" mongo-ref="mongo" />

<bean id="gridFsTemplate" class="org.springframework.data.mongodb.gridfs.GridFsTemplate">
<constructor-arg ref="mongoDbFactory" />
<constructor-arg ref="mongoConverter" />
</bean>

<bean id="mongoTemplate" class="org.springframework.data.mongodb.core.MongoTemplate">
<constructor-arg name="mongo" ref="mongo"/>
<constructor-arg ref="mongoDbFactory"/>
<constructor-arg ref="mongoConverter" />
<constructor-arg name="databaseName" value="test"/>
</bean>

<bean class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor"/>
Expand Down

0 comments on commit 919123b

Please sign in to comment.