【发布时间】:2016-09-25 16:36:06
【问题描述】:
我想制作我的第一个 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 并且没有具有该名称的类文件。
你们能帮我修复我的构建路径以免收到此错误吗?
【问题讨论】:
-
你能告诉我们生成的POM吗?
-
在构建路径中添加 org.springframework.format.FormatterRegistry jar 文件。在此链接中查看我对问题的回答:stackoverflow.com/questions/39688536/…希望这能解决您的问题
-
@AnusKaleem 这不是一个好方法。他已经在 Eclipse 中使用了 Maven。所以正确的步骤是在 POM 中声明一个依赖,然后让 M2E 插件完成它的工作。无需手动向构建路径添加任何内容。
标签: java eclipse spring maven spring-mvc