打开官方文档链接
有这么一段
添加依赖
With Gradle, the dependency should be declared in the annotationProcessor configuration, as shown in the following example:
dependencies {
// kapt("org.springframework.boot:spring-boot-configuration-processor")
annotationProcessor ("org.springframework.boot:spring-boot-configuration-processor")
}
问题:因为我用的Kotlin,为什么kapt不行,一定要annotationProcessor