STEP4---> Add spring frames to your project----> modify MAVEN profile Pom.xml to add some modules of the spring framework to your project

Source: Internet
Author: User

1. Contents of this article:

This article describes how you can use MAVEN to add various frameworks to your project, that is, how to configure Maven's pom.xml to let Maven help manage these frameworks (including Spring, SPRINGMVC, hibernate framework, and so on).

2. Use Maven to add a frame to your project: 2.1 Overview

If you want to use MAVEN to add a three-way framework (such as spring, SPRINGMVC, etc.) to your project, you need to make sure that your project is a MAVEN project, and if you don't yet know how to build a Maven Web project in MyEclipse, refer to the tutorial.

2.2 Adding a spring framework to your project using MAVEN

            reference : 1) Spring website tutorial

2)

            actual operation process :

                 Step1, Note version support issues

                      

Step2,in MyEclipse, locate the "project name/pom.xml" file, edit Pom.xml, and add the following code to the file:

<Dependencies>    <Dependency>        <groupId>Org.springframework</groupId>        <Artifactid>Spring-context</Artifactid>        <version>4.3.4.RELEASE</version>    </Dependency></Dependencies>
Configuration results such as:
                        

step3, after Step2, we have added the core modules of the spring framework spring-context into their own projects, the following can write the corresponding test code to test whether to add success.

Related code:

                      

                

STEP4---> Add spring frames to your project----> modify MAVEN profile Pom.xml to add some modules of the spring framework to your project

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.