Eclipse Spring MVC模板项目和Maven依赖

发布于 2024-12-09 01:11:02 字数 435 浏览 3 评论 0原文

我在使用 Eclipse STS 套件使用 Maven 开发 Spring MVC 项目时遇到问题。默认情况下,Spring MVC 模板使用maven 进行构建。它使用 maven 构建(在 pom.xml 上进行 rmc -> Run As -> Maven install),但 eclipse 将所有 maven 管理的依赖项以红色突出显示。 (并将它们标记为错误)我正在使用 m2eclipse 作为 eclipse WTP。 这是一个屏幕截图: http://rghost.ru/24803261

这是我的 pom.xml 文件: http://pastebin.com/5EvNQvHe

I have a problem using Eclipse STS suite for developing Spring MVC project with Maven. By default, Spring MVC template uses maven for building. It builds with maven (rmc on pom.xml -> Run As -> Maven install) but eclipse highligts all maven-managemented dependencies in red. (and mark them as an errors) I'm using m2eclipse for eclipse WTP.
Here is a screenshot:
http://rghost.ru/24803261

And here is my pom.xml file: http://pastebin.com/5EvNQvHe

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

东北女汉子 2024-12-16 01:11:02

如果 pom.xml 中没有错误标记,那么大多数情况下只是引用问题。

(确保该项目启用了 Maven 支持(“package explorer”/Project/Maven/Enable Dependency Management)。

然后尝试:在“package explorer”中右键单击您的项目,选择 Maven/Update Project配置来更新项目配置。

If there is no error marker in the pom.xml then is mostly only a refereshing problem.

(Make sure, that Maven support is enables for this project ("package explorer"/Project/Maven/Enable Dependency Management).

Then Try: right click on your project in the "package explorer", select Maven/Update Project Configuration to update the project configuration.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文