Create a simple project using the STS (Eclipse) +maven+spring MVC

Source: Internet
Author: User

FAQ: Src/main/java (missing) src/main/resouces (missing) src/test/java/(missing) solution in 4th

Install the process no longer repeat, I was directly installed STS, has integrated the MAVEN

Steps are as follows

1. After opening the STS, from File->new->other->maven->maven project Figure 1
2. Select Next, the default option, Next,catalog select Interal,filter input web, select Org.aphache.maven.archetypes,next,group ID and artifact ID can be entered arbitrarily, Artifact is the name of your project. Click Finish to complete. Figure 2


3. Select Engineering, properties, Project facts, check the Dynamic Web Module,java,javascript, version can choose a higher point of Figure 3
4. Problem, build path is wrong, temporarily do not know how to deal with figure 4
Update: Solution: Add the server Library on it, at the same time, the project will be added Src/main/java,src/main/resources,src/test/main three source folder; Figure 5
5.pom.xml file Writing, open Pom.xml, add the required dependency, you can go to http://mvnrepository.com/search such as the Spring Web MVC version can choose a high version, click Version Number, You can see the configuration that Maven needs, and copy it into Pom.xml to figure 6,7,8,9





The rest of the work is writing web.xml, writing a servlet configuration, writing Java files, etc.


Related Article

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.