【发布时间】:2019-10-09 12:25:10
【问题描述】:
目的是什么:
annotationProcessor "org.springframework.boot:spring-boot-autoconfigure-processor"
无论有没有它,我的应用程序都可以正常工作。我创建的瘦 jar 在依赖项目中也可以正常工作。
我问这个是因为当我将它包含在本地 build.gradle 中时该行工作正常。但是一旦我将它推送到云端,我就会收到这个错误:
在 org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler 类型的对象上找不到参数 [org.springframework.boot:spring-boot-autoconfigure-processor] 的方法 annotationProcessor()。
所以我想不用它。我没有看到对瘦 jar 或依赖项目的任何影响。
另外,This page 说我在使用 Gradle 4.6 或更高版本时必须在 build.gradle 中使用 annotationProcessor。如果我在 Gradle 4.8 中使用 compileOnly 选项会怎样?
【问题讨论】:
标签: spring-boot