[英]How can I correctly create a new Spring MVC project with Maven structure using STS\Eclipse?
I am using STS (the Elipse version for Spring framework) and I am finding some difficulties to create a new Spring MVC project that use Maven structure.我正在使用 STS(Spring 框架的 Elipse 版本),我发现创建一个使用 Maven 结构的新 Spring MVC 项目有一些困难。
So I am trying to do something as shown in this tutorial: http://www.codejava.net/frameworks/spring/creating-a-spring-mvc-project-using-maven-and-eclipse-in-one-minute所以我试图做一些本教程中所示的事情: http : //www.codejava.net/frameworks/spring/creating-a-spring-mvc-project-using-maven-and-eclipse-in-one-minute
So I do: File ---> New ---> Maven Project所以我这样做:文件 ---> 新建 ---> Maven 项目
and when I come to the Select an Archetype wizard I select All Categories into the Catalog dropdown and it show this list of archetype:当我来到选择一个原型向导时,我在目录下拉列表中选择所有类别,它显示了这个原型列表:
As you can see there is no reference to any kind of Spring project and if I write "Spring" into the Filter I obtain no result.正如您所看到的,没有对任何类型的 Spring 项目的引用,如果我将“Spring”写入过滤器,则不会获得任何结果。
Why?为什么? What am I missing?我错过了什么?
Instead of using the archetypes, use Spring Initializr and import the Maven project it creates.不要使用原型,而是使用Spring Initializr并导入它创建的 Maven 项目。 If you have a recent version of STS, you can go to File->New->Spring Starter Project and fill out the form from the Eclipse wizard.如果您有最新版本的 STS,您可以转到 File->New->Spring Starter Project 并从 Eclipse 向导填写表单。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.