Build a framework from scratch Ssm+redis+mysql (ii) MAVEN project setup

Source: Internet
Author: User
Tags redis

Build a framework from scratch Ssm+redis+mysql (ii) MAVEN project setup

Nonsense not to say, direct to the steps!!!

1. Create the main project: Ncc-parent

Select maven to create the project, note in the Create project,packing select pom, which represents this is not a project, just a Maven 's main project, this project is used to integrate multiple sub-projects

2. Create the Ncc-core sub-project:

Note: When creating a project, you need to select parentProject to navigate to the NCC-parentthat youcreated earlierso that dependencies on thesubproject are inherited from the parent project;

3. Create the Ncc-front project:

1, create a maven-web project;

Similarly, create a ncc-host project in the same way you create ncc-front;

4. Catalog Structure of the project

Modify the JRE for the project and several other items to be modified

After modification

5.Maven of dependency Testing

in the main project's pom file, add:

<Dependencies>    <Dependency>        <groupId>Junit</groupId>    <Artifactid>Junit</Artifactid>    <version>4.12</version>    </Dependency></Dependencies>    

Note: If you modify the pom.xml file of the parent Project when the project is published, you need to load the project in the maven repository

Refresh the project to see that three sub-projects have inherited the JUnit configuration of the master project ;

6. Environmental configuration of the project

to configure a consolidated build: Add in the main project's Pom :

<Build>    <Plugins>        <plugin>                        <groupId>Org.apache.maven.plugins</groupId>                <Artifactid>Maven-compiler-plugin</Artifactid>                <Configuration>                    <Source>1.7</Source>                    <Target>1.7</Target>                </Configuration>            </plugin>    </Plugins></Build>    

A missing error occurred.

Refresh all child items to

Configure the Unified compilation character set: add in main project Pom.xml

< Properties > < project.build.sourceEncoding > UTF-8</project.build.sourceEncoding></Properties  >

MAVEN project Setup (end)

Build a framework from scratch Ssm+redis+mysql (ii) MAVEN project setup

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.