简体   繁体   English

如何使用 STS\\Eclipse 正确创建具有 Maven 结构的新 Spring MVC 项目?

[英]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.

相关问题 如何在Eclipse中使用Maven创建Spring Web项目? - How can I create Spring web project with Maven in Eclipse? 在Eclipse中使用Maven创建一个Spring MVC项目 - creating a spring mvc project using maven in eclipse 如何使用最后的STS版本(3.8.4.RELEASE)正确创建在控制台中运行的简单Spring项目? - How to correctly create a simple Spring project running in the console using the last STS version (3.8.4.RELEASE)? 使用STS模板项目创建新的Spring MVC项目时行为异常,URL不正确,我必须重新构建项目 - Strange behavior in the creation of new Spring MVC project using STS template project, the URL is not correct and I have to rebuild the project 如何使用Maven创建新的Eclipse RCP项目? - How to create new Eclipse RCP project using Maven? 无法在STS中创建Maven项目 - Can't create maven project in STS 当我使用STS创建spring MVC项目时,如何修改默认XML内容 - When I created the spring MVC project with STS, how can modify the default XML content 我无法在STS中创建Maven项目 - I am not able to create maven Project in STS 如何在Eclipse / STS中运行intellij项目? - How can i run an intellij project in eclipse/sts? 如何在 spring sts 中获取 spring 引导 web 项目的默认结构? - How to get default structure of spring boot web project in spring sts?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM