ZK With MongoDB Part 3 - Using Spring Data
From Documentation
Revision as of 08:45, 12 January 2012 by Southerncrossie (talk | contribs) (Created page with "{{Template:Smalltalk_Author| |author= Ashish Dasnurkar, Engineer, Potix Corporation |date=January 18, 2012 |version=ZK 5 }} {{Template:UnderConstruction}} =Introduction= For ...")
Author
Ashish Dasnurkar, Engineer, Potix Corporation
Ashish Dasnurkar, Engineer, Potix Corporation
Date
January 18, 2012
January 18, 2012
Version
ZK 5
ZK 5
Introduction
For Spring application developers, Spring Data project has support for MongoDB that allows mapping Java objects to/from mongoDB documents. In this article I will rewrite the same TODO application sample code described in Part 1 and Part 2 of this series using Spring data for mongoDB.
Using Spring Data for MongoDB
Spring Data
To include Spring Data for mongodb, add Spring milestone repository in pom.xml as we will use its latest 1.0.0.M5 milestone release
<repository>
<id>spring-milestone</id>
<name>Spring Maven MILESTONE Repository</name>
<url>http://maven.springframework.org/milestone</url>
</repository>
Then add Spring data mongodb dependency in pom.xml as shown below;