Spring MVC migration project to build a run

Due to the project requirements, you may need to migrate the project, or change the project, this chapter of the software migration process and the need to involve may encounter some problems, here to make a record of the process and solutions, if insufficient, please add.

A non-primary document distributed project for src and pom.xml file (the project using maven), general files stored on the git only keep two.

  Wherein, src source code for the project, which includes .java, * Mapper.xml, dependent jar package and .jsp bin directory file (stored in different files in accordance with the front end of the relevant frame, front and rear ends separate item, which is not included)

  pom.xml file is packaged information on the project, and a variety of plug-in dependencies

First prepare the development environment: Install jdk, idea, tomcat, maven four tools

  Installation jdk: Download jdk package and configuration environment variable Details can be found: https://www.cnblogs.com/heqiyoujing/p/9502726.html

  Installation idea: idea Download and cracked, details refer to: https://www.jianshu.com/p/7d60ea5e51e9

  Installation tomcat | tomcat: extract can be directly downloaded from the Internet

The first step: Import project idea:

  Click the top left File ---- Open to open the file selector, you can select the project directory

Step Two: Configure tomcat

  Click on the top right corner Edit Configurations, as shown below:

  Then pop-up screen, click the + upper left corner, select Tomcat Server

    1, in the Server tab, Application server installed yourself a check tomcat

    2. In the Deployment tab, click the + sign on the right, click Artiface, select Configure tomcat running war package

 

 

 

 Step Three: Configure maven

   Click the top left File ---- Settings pop-up box, find the search box in the upper left put, search "maven", maven project configuration of the installed position, as well as the storage location of dependencies

 

 

 On the right side project, maven column click the Reset button above to update maven repository

 

 

 If there lib dependencies can be introduced into maven dependencies may also be compiled directly into the project:

 

 Click File --- Project Structure open the pop-up window in which to select Libraries option, click to select the + sign above the java open a file selector, you select the src of these packages, you can click OK:

 

Last tomcat start to run the project, the migration is complete!

 

Guess you like

Origin www.cnblogs.com/fuhui-study-footprint/p/12505761.html