Adding Dependencies
To start couch implementation,Add the following dependency
<dependency>
<groupId>com.couchbase.client</groupId>
<artifactId>java-client</artifactId>
<version>2.2.5</version>
</dependency>
To start Mongo implementation,Add the following dependency
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
<version>2.12.3</version>
</dependency>
Including the above dependency, I would use something called morphia which makes it much easier doing operations with MONGO.Morphia Dependency is added below
<dependency>
<groupId>org.mongodb.morphia</groupId>
<artifactId>morphia</artifactId>
<version>1.3.1</version>
</dependency>
In SQL perspective, think "mongo-java-driver" as JDBC connection and "morphia" as JPA.
0 comments:
Post a Comment