Reputation: 1009
My project in Spring Tool Suite report Unable to "load annotation processor factory 'org.springframework.boot.configurationprocessor.ConfigurationMetadataAnnotationProcessor' for project XXX", My project runs fine, but I do not want to see this error.I did a lot of searching, but I could not find any result. Thanks a lot.
Upvotes: 26
Views: 21889
Reputation: 9104
After much trouble trying to fing a working answer for this error, I finally found the way myself:
In Project Properties
> Java Compiler
> Annotation Processing
> Factory Path
project specific settings
;Factory Path
;project specific settings
;The error messages will go away.
Upvotes: 1
Reputation: 2220
I am using Eclipse, not Spring Tools Suite, but maybe this will still be helpful..
Eclipse reported the following as an APT Problem:
Unable to load annotation processor factory '/path/to/gradle/cache/org.springframework.boot/spring-boot-configuration-processor/2.4.4/12575686ba3820571ea79bfd08d6d27534b97a0e/spring-boot-configuration-processor-2.4.4.jar' for project ...
The version of the annotation processor factory in the error message was from an older version of Spring Boot. The project had been migrated.
I opened project properties Java Compiler -> Annotation Processing -> Factory Path
and removed the old spring-boot-configuration-processor jar from the list, and the error went away. The correct jar was there already.
Upvotes: 0
Reputation: 19471
You need to add the spring boot configuration processor to your project; when using maven add this dependency:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
You find more information in the spring boot documentation.
Upvotes: 3