Java MongoDB Client Development (MAVEN project, using MongoDB jar package)

Source: Internet
Author: User
Tags mongodb mongodb client

The content of the Pom.xml in HelloWorld's MAVEN project is

But what if you want to refer to a third party's library development? This article discusses this issue, taking MongoDB as an example, here does not introduce MongoDB, only know that he is a nosql, and there are client and server,

We will refer to MongoDB Library to realize MongoDB and delete

New Configuration in Pom

<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
<version>2.6.5</version>
</dependency>

This will have a corresponding package at the local warehouse location.


Next we use the MongoDB jar package to develop the client, here is the Java architecture, the simple implementation of code logic, specifically as follows

Reference MongoDB Java api:http://api.mongodb.org/java/2.6.5/





Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.