STS Building SPRINGMVC Framework (ii)

Source: Internet
Author: User
Tags tomcat server

Second, the installation process

  1. JDK

To install the JDK:

You can start the installation by double-clicking the Jdk-8u171-windows-x64.exe file. You can use the default configuration to continue clicking next until the installation is complete.

You can also manually specify the installation directory, for example, I install the JDK myself in the D:\JAVA\JDK1.8.0_171,JRE installation at D:\Java\jre1.8.0_171.

    To configure environment variables:

   ⑴ Right-click on the computer icon, then click on the menu item at the bottom of the menus, or open the Control Panel continuously-system and security-the system can also

⑵ Click Advanced System Settings-advanced-System Variables

⑶ the Java_path value of the new variable in the system variable is the installation root of the JDK. Example: D:\Java\jdk1.8.0_171

⑷. Continue to create a new variable CLASSPATH value of .;        %java_home%\lib; Note that the value of this variable begins with a period symbol and ends with a semicolon.

⑸ edit the path variable and add the string to the front ;%java_home%\bin;%java_home%\jre\bin; Note that there is no path variable that needs to be created manually.

    Test:

      Using the Win+r combination shortcut to open the Run tool, enter the cmd command into the DOS window, continue to enter the Java-version has the following output, that is, the installation is successful.

      

  2. Maven

    Installation:

    Unzip the downloaded file Apache-maven-3.5.3-bin.zip to the specified directory (here according to your needs). I was put in the E:\apache-maven-3.5.3, the directory has bin, Lib and other folders.

    

    Environment variable configuration:

    Process and install the JDK, create a variable m2_path value of E:\apache-maven-3.5.3 . Find the variable path, add the string ;%m2_home%\bin;

    

Test:

    Open the DOS command window, the input mvn-v has the following output, that is, the installation is successful.

    

    Modify the Local warehouse location (this step is omitted if you do not want to modify the local warehouse location)

maven places the downloaded class library in a local directory (typically stored in the C: \ My document \.m2.\repository), and if you want to change the location of this directory, you need to modify the configuration of the Maven local repository.

1, create the local warehouse location, my location is (E:\Maven\repo)

2, locate the Conf folder in the directory where Maven is installed, locate the Settings.xml file in the folder, copy the Settings.xml file in E:\Maven, as shown in:

            

3. Modify the Settings.xml file as shown in:

      

4. Locate the Conf folder in the directory where MAVEN is installed, locate the Settings.xml file in the folder, and change the default warehouse location as shown: (Note the settings.xml in all two places to be modified)

      

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

5. DOS window input: mvn help:system

After executing the command, a number of files appear under E:/maven/repo, which are files that Maven downloads from the central repository to the local repository.

  3. TOMCAT

    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

    

    

    

Configuring the Tomcat server

    

STS Building SPRINGMVC Framework (ii)

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.