@ConfigurationProperties Spring Boot Configuration Annotation Processor not found in classpath

前端 未结 13 1051
太阳男子
太阳男子 2021-02-02 05:06

I try to make completion for custom properties in Spring Boot.

I tried to create a simple project via IntelliJ IDEA 2016.3:

  1. Created a new G
13条回答
  •  不思量自难忘°
    2021-02-02 05:30

    For those who are using maven, Intellij was still not happy with the addition of dependency. Seems like adding annotationProcessorPaths via maven-compiler-plugin finally tamed the beast.

    Make sure the version matches your spring dependencies. I suspect it would be already present in your effective POM.

    Reason: I was using a custom parent-pom which had a mapstruct annotation processor set in annotationProcessorPaths and that actually triggered IntelliJ to ask for all other annotation processors to be specified manually as well.

    
    
      
        org.apache.maven.plugins
        maven-compiler-plugin
        
          
            
              org.springframework.boot
              spring-boot-configuration-processor
              2.0.4.RELEASE
            
          
        
      
    
    
    

提交回复
热议问题