MongoDB with spring, MAVEN integration

Source: Internet
Author: User
Tags redis log4j

The

recently studied the pros and cons of using MongoDB in projects, and has been thinking, as NoSQL's classic MongoDB, can not in a project completely replace the outstanding representative of the mature relational database MySQL, as the data storage media; It takes a combination of the two to play their greatest power.
Spring's integration with the ORM framework of various relational databases (such as Hibernate/mybatis) is very mature and is the most common way we use in project development. This article describes how to use SPRING-DATA-MONGODB in spring to simplify access to the MongoDB database. Create a new MAVEN project and introduce a SPRING-DATA-MONGODB dependency package, where I list my project pom.xml files.

<project xmlns= "http://maven.apache.org/POM/4.0.0" xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance" xsi: schemalocation= "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" > < Modelversion>4.0.0</modelversion> <groupId>com.laizs</groupId> <artifactId> Dubbo-project</artifactid> <version>0.0.1-SNAPSHOT</version> <packaging>pom</ packaging> <name>dubbo-project</name> <modules> <module>dubbo-project-model< 
        /module> <module>dubbo-project-core</module> <module>dubbo-project-rpc</module> <module>dubbo-project-web</module> </modules> <properties> <org.spring Framework-version>3.2.4.release</org.springframework-version> <
     Org.springframework.sercurity-version>3.1.4.release</org.springframework.sercurity-version>   <org.hibernate-version>3.6.10.Final</org.hibernate-version> <org.aspectj-version>1.6.10</o Rg.aspectj-version> <org.slf4j-version>1.6.6</org.slf4j-version> <project.build.sourceen Coding>utf-8</project.build.sourceencoding> <project.reporting.outputencoding>utf-8</ Project.reporting.outputencoding> 
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.