@ConfigurationProperties Spring Boot Configuration Annotation Processor not found in classpath

Feeco :

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 Gradle project with Spring Boot Initializer (I haven't checked nothing at all).
2. Created a new class Properties.
3. When I annotated it with @ConfigurationProperties, the next notification has appeared: notification The documentation said that I should add the following to my project:

dependencies {
    optional "org.springframework.boot:spring-boot-configuration-processor"
}

compileJava.dependsOn(processResources)

After that I tried to rebuild project and enable annotation processors in settings but the notification hasn't gone. Completion doesn't work too (I created a string my).

Icex :

I had the same problem. I use idea 2017.2 and gradle 4.1, and some blog said you should add:

dependencies {
    optional "org.springframework.boot:spring-boot-configuration-processor"
}

But I changed it to this:

dependencies {
    compile "org.springframework.boot:spring-boot-configuration-processor"
}

And the warning is gone.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=424547&siteId=1