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...