Spring Tool Suite 中的项目报告“无法加载注释处理器工厂”

sno*_*261 14 java spring spring-tool-suite

我在 Spring Tool Suite 中的项目报告 Unable to "load annotation processor factory 'org.springframework.boot.configurationprocessor.ConfigurationMetadataAnnotationProcessor' for project XXX",我的项目运行正常,但我不想看到这个错误。我做了很多搜索,但我找不到任何结果。非常感谢。

在此处输入图片说明

小智 22

.factory从项目根目录中删除该文件。

  • 找不到.factory。所以删除了 .factorypath 并且它起作用了。 (14认同)
  • 我遇到了这个问题,您的简单/简单的修复对我有用。 (2认同)

P.J*_*sch 3

您需要将 spring boot 配置处理器添加到您的项目中;使用maven时添加此依赖项:

<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-configuration-processor</artifactId>
  <optional>true</optional>
</dependency>
Run Code Online (Sandbox Code Playgroud)

您可以在spring boot 文档中找到更多信息。

  • 抱歉回复晚了,在我的项目中,我有上述依赖关系并且存在问题。 (2认同)