diff --git a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 4c589334c0..bf445cc119 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -6490,6 +6490,30 @@ TIP: You should mark the dependencies to the library as optional so that you can the autoconfigure module in your projects more easily. If you do it that way, the library won't be provided and Spring Boot will back off by default. +Spring Boot uses an annotation processor to collect the conditions on auto-configurations +in a metadata file (`META-INF/spring-autoconfigure-metadata.json`). If that file is +present, it is used to eagerly filter auto-configurations that do not match, which will +improve startup time. It is recommended to add the following dependency in a module that +contains auto-configurations: + +[source,xml,indent=0,subs="verbatim,quotes,attributes"] +---- + + org.springframework.boot + spring-boot-autoconfigure-processor + true + +---- + +With Gradle you would add: + +[source,groovy,indent=0,subs="verbatim,quotes,attributes"] +---- + dependencies { + compileOnly "org.springframework.boot:spring-boot-autoconfigure-processor" + } +---- + [[boot-features-custom-starter-module-starter]]