Announcement Announcement Module
No announcement yet.
Using Spring Data with MongoDB and MySQL Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using Spring Data with MongoDB and MySQL

    I am trying to update Mongo DB at one of my service using spring data.

    Though i am able to save normal objects simultaneously in Mysql and MongoDb using cross store

    I am unable to save only in MongoDB and unable to exclude Mysql updation .In my Service Layer i get a handle of repository which extends MongoRepository and i do a

    xml file entries

    <mongo:repositories base-package="com.mycompany.mongo" mongo-template-ref="mongoTemplate" />
    <mongo:mongo host="localhost" port="27017"/>
    <bean id="mongoTemplate" class=" Template">
    <constructor-arg ref="mongo"/>
    <constructor-arg value="mydb"/>

    <bean class=" ExceptionTranslator" />


    <bean class=" nt.mongodb.MongoDocumentBacking" factory-method="aspectOf">
    <property name="changeSetPersister" ref="mongoChangeSetPersister" />

    <bean id="mongoChangeSetPersister" class=" nt.mongodb.MongoChangeSetPersister">
    <property name="mongoTemplate" ref="mongoTemplate" />
    <property name="entityManagerFactory" ref="entityManagerFactory" />

    I Also found a bug in cross store which says there are issues in weaving third party code, Does this bug relates to the problem i am facing?