Set up SpringMVC project in STS

Source: Internet
Author: User

1. Environment Description

When I first came into contact with Spring and faced with such an excellent framework, I started from the environment and learned it slowly. When Spring Tool Suite is selected for the development environment, is it professional? Select 2.2.1 for Maven, JDK or 1.6, and Tomcat uses 7. Next, let's take a step...

2 install STS

Spring Tool Suite is a free customized version IDE developed based on Eclipse Spring. Its official version is:

Http://spring.io/tools/sts/all

I chose the latest version 4.3.1, 64-bit.

In Windows, it is an exe executable file. You do not have to elaborate on installation.

3. Install Maven

Maven is indispensable for building a project. However, according to my current usage, I chose Maven2 and gave up Maven3. its official website is:

Http://maven.apache.org/download.cgi

For specific versions, I chose version 2.2.1.

The downloaded package is a zip package. After extracting the package to the relevant directory, You need to configure the environment variables, similar to Java.

After the configuration is complete, execute mvn-v in the command line to check whether it is done.

After completing the preceding steps, you need to configure the Maven environment of our system in STS. For details, see:

 

4. Create a MVC Project

: Click New In the STS menu, select the project type to be created, and select""

 

: Enter the project name and select""

 

: Enter

 

: Click Finish to complete the creation. The following is the project.

 

The package name is.

Use Maven for compilation and packaging, and select Tomcat7 for running:

View the running result in a browser:

):

            Home         The time on the server is ${serverTime}.   

 

After the environment is set up, you are ready to enter Spring's learning course...

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.