STS builds springMVC framework (2)

Second, the installation process

  1、JDK 

    Install JDK:

    Double-click the jdk-8u171-windows-x64.exe file to start the installation. You can use the default configuration, and click Next until the installation is complete.

    You can also manually specify the installation directory. For example, I installed the JDK in D:\Java\jdk1.8.0_171 and the JRE in D:\Java\jre1.8.0_171.

         

    Configure environment variables:

        ⑴ Right-click the computer icon, then click the Properties menu item at the bottom of the menu, or continuously open the Control Panel--System and Security--System can also be

        (2) Click Advanced System Settings - Advanced - System Variables

        (3) Create a new variable JAVA_PATH in the system variable whose value is the installation root directory of the JDK. For example: D:\Java\jdk1.8.0_171

        ⑷ . Continue to create a new variable CLASSPATH with a value of  .;%JAVA_HOME%\lib;        Note that the value of this variable starts with an English period and ends with a semicolon.

        ⑸ Edit the PATH variable and add the string at the top   ; %JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;       Note that there is no PATH variable that needs to be created manually.

    test:

      Use the shortcut key combination win+R to open the running tool, enter the cmd command to enter the DOS window, and continue to enter java -version. The following output is displayed, that is, the installation is successful.

      

  2、Maven

    Install:

    Unzip the downloaded file apache-maven-3.5.3-bin.zip to the specified directory (here according to your needs). I put it in E:\apache-maven-3.5.3, and there are bin, lib and other folders in the directory.

    

    Environment variable configuration:

    The process is the same as when installing the JDK, and the value of the variable M2_PATH is created as E:\apache-maven-3.5.3   . Find the variable PATH and add the string  ;%M2_HOME%\bin;

    

    test:

    Open the DOS command window, enter mvn -v and the following output is displayed, that is, the installation is successful.

      

    

    Modify the local warehouse location (if you do not want to modify the local warehouse location, this step can be omitted)

      Maven will place the downloaded class library in a local directory (usually stored in C:\My Documents\.m2.\repository by default). If you want to change the location of this directory, you need to modify the configuration of Maven's local warehouse:

      1. Create a local warehouse location, my location is (E:\Maven\repo)

      2. Find the conf folder in the directory where Maven is installed, find the settings.xml file in the folder, copy the settings.xml file and put it in E:\Maven, as shown in the following figure:

            

      3. Modify the settings.xml file as shown below:

      

    4. Find the conf folder in the directory where Maven is installed, find the settings.xml file in the folder, and change the default warehouse location as shown below: (note that the settings.xml in both places must be modified)

      

        According to this configuration, Maven will save the downloaded class library to E:/Maven/repo.

     5. Dos window input: mvn help:system

      After executing this command, there will be many files under E:/Maven/repo, these files are the files downloaded by maven from the central repository to the local repository.

  3、TOMCAT

    Just unzip it, my directory is  E:\apache-tomcat-8.5.30

  4、STS

    Unzip the downloaded file, my directory is  E:\sts-bundle\sts-3.9.4.RELEASE , open the tool

    Configure local Maven

    

    

    

 

     Configure TOMCAT Server

    

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325225065&siteId=291194637