Maven - 不完整的构建路径

时间:2016-09-25 16:36:07

标签: java eclipse spring maven spring-mvc

我想制作我的第一个Maven spring应用程序。我已经通过使用spring-mvc-archetype作为新项目创建新的maven应用程序来启动它。

创建项目后,我收到错误:

The project was not built since its build path is incomplete. Cannot find the class file for org.springframework.format.FormatterRegistry. Fix the build path then try building this project The project was not built since its build path is incomplete. Cannot find the class file for org.springframework.format.FormatterRegistry. Fix the build path then try building this project

我正在检查project -> build paths -> configure build paths -> Libralies -> Maven dependencies并且没有具有该名称的类文件。

你们可以帮我修复我的构建路径,以免收到此错误吗?

1 个答案:

答案 0 :(得分:0)

此课程可在spring-context

中找到

将以下依赖项添加到您的pom.xml

<dependency>
 <groupId>org.springframework</groupId>
 <artifactId>spring-context</artifactId>
 <version>your spring version</version>
</dependency>