1. Java JDK and Tomcat installation
I am installing JDK 1.8 and Tomcat 8 here, as described in the installation steps: http://www.cnblogs.com/eczhou/p/6285248.html
2. Download Eclipse and install
I am installing the Java EE Neon 64-bit version here.
3. Build the Spring MVC Project
3.1. Open the installed Eclipse and select File->new->other. Select Web->dynamic Web Project in the pop-up box and select Next.
3.2, give the project a name, we play a springdemo:
3.3, click Finish after the project is established, see.
4. Import the Spring MVC installation package
Well, we've built a dynamic Web project on top of it, but it doesn't have anything to do with spring MVC, so now we're going to import the spring MVC-related jar package into the project. Spring MVC has been through several versions, from the initial 2.* to the current version of 4.*, and we're definitely using the new version. Spring's official website address is very slow to open, http://projects.spring.io/spring-framework/, it can be said that basically do not open, let alone download. Fortunately, I found a domestic download service site, free of charge to everyone.
: http://repo.springsource.org/libs-release-local/org/springframework/spring/
All major versions are available.
We chose 4.3.5.RELEASE, but found that can not download, so according to the red part of the name to csdn download one.
Unzip the downloaded compressed package, where Libs is the Spring MVC jar package.
Take these packages to the/webcontent/web-inf/lib directory of the project. The Spring MVC project runs automatically when the jar package is loaded.
If you want to run the project properly, just the Spring MVC jar package is not enough, it also requires servlets and commons-loging packages, downloaded and placed in the/webcontent/web-inf/lib directory .
1. The servlet package can copy Servlet-api.jar from the Tomcat installation directory, as shown in:
2. commons-loging package can be downloaded from http://commons.apache.org/proper/commons-logging/download_logging.cgi, I download the version as follows:
Copy the Commons-logging-1.2.jar and Commons-logging-1.2-javadoc.jar inside the project's /webcontent/web-inf/lib directory .
Java Spring MVC Project Build (i)--spring MVC framework Integration