Spring boot gradle build--warning mode=所有不推荐使用的警告注释处理器都使用处理器路径

Spring boot gradle build--warning mode=所有不推荐使用的警告注释处理器都使用处理器路径,spring-boot,gradle,build.gradle,Spring Boot,Gradle,Build.gradle,当我执行gradle clean build--warning mode=all时,我得到以下警告: Putting annotation processors on the compile classpath has been deprecated and is scheduled to be removed in Gradle 5.0. Please add them to the processor path instead. If these processors were uninte

当我执行gradle clean build--warning mode=all时,我得到以下警告:

Putting annotation processors on the compile classpath has been deprecated and is scheduled to be removed in Gradle 5.0. Please add them to the processor path instead. If these processors were unintentionally leaked on the compile classpath, use the -proc:none compiler option to ignore them..
build.gradle

buildscript {
    ext {
        springBootVersion = '1.5.10.RELEASE'
    }
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
    }

}
apply plugin: 'war'
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
repositories {
    mavenCentral()
}


dependencies {
    compile "org.springframework.boot:spring-boot-starter-web"
    compile "org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.1"
    compile files("libs/ojdbc7.jar")
    compile "org.springframework.boot:spring-boot-configuration-processor"
    compile group: "javax.inject", name: "javax.inject", version: "1"
    runtime "org.springframework.boot:spring-boot-devtools"
    providedRuntime "org.springframework.boot:spring-boot-starter-tomcat"
    testCompile "org.springframework.boot:spring-boot-starter-test"
}
bootRepackage {
    enabled = false
}

我不明白警告是关于什么的。我对格拉德尔还是个新手。我需要帮助了解我应该使用的
注释处理器
,以及如何使用
处理器路径

什么是
注释处理器?

注释处理器是充当钩子的Java模块/库 进入java编译器的编译过程,分析源代码 用户定义注释的代码,然后处理(通过生成 编译器错误、编译器警告、发出源代码、字节码 …)

我应该如何使用它?

其中一个编译依赖项必须包含注释 幕后处理器

如何改用处理器路径?

根据Gradle,您可以添加注释处理器 配置如下所示

或者,您可以在编译器参数中放入
-proc:none
,以按照以下步骤忽略它

dependencies {
    annotationProcessor 'com.google.dagger:dagger-compiler:2.8'
    implementation 'com.google.dagger:dagger:2.8'
}