@ -283,18 +283,7 @@ If you do it that way, the library is not provided and, by default, Spring Boot
@@ -283,18 +283,7 @@ If you do it that way, the library is not provided and, by default, Spring Boot
Spring Boot uses an annotation processor to collect the conditions on auto-configurations in a metadata file (`META-INF/spring-autoconfigure-metadata.properties`).
If that file is present, it is used to eagerly filter auto-configurations that do not match, which will improve startup time.
When building with Maven, it is recommended to add the following dependency in a module that contains auto-configurations:
If you have defined auto-configurations directly in your application, make sure to configure the `spring-boot-maven-plugin` to prevent the `repackage` goal from adding the dependency into the uber jar:
When building with Maven, configure the compiler plugin (3.12.0 or later) to add `spring-boot-autoconfigure-processor` to the annotation processor paths:
[source,xml]
----
@ -302,15 +291,15 @@ If you have defined auto-configurations directly in your application, make sure
@@ -302,15 +291,15 @@ If you have defined auto-configurations directly in your application, make sure
@ -9,20 +9,31 @@ The jar includes a Java annotation processor which is invoked as your project is
@@ -9,20 +9,31 @@ The jar includes a Java annotation processor which is invoked as your project is
To use the processor, include a dependency on `spring-boot-configuration-processor`.
With Maven the dependency should be declared as optional, as shown in the following example:
When building with Maven, configure the compiler plugin (3.12.0 or later) to add `spring-boot-configuration-processor` to the annotation processor paths:
With Gradle, the dependency should be declared in the `annotationProcessor` configuration, as shown in the following example:
With Gradle, a dependency should be declared in the `annotationProcessor` configuration, as shown in the following example:
[source,gradle]
----
@ -64,8 +75,8 @@ You could also let the AspectJ plugin run all the processing and disable annotat
@@ -64,8 +75,8 @@ You could also let the AspectJ plugin run all the processing and disable annotat
[NOTE]
====
If you are using Lombok in your project, you need to make sure that its annotation processor runs before `spring-boot-configuration-processor`.
To do so with Maven, you can list the annotation processors in the right order using the `annotationProcessors` attribute of the Maven compiler plugin.
If you are not using this attribute, and annotation processors are picked up by the dependencies available on the classpath, make sure that the `lombok` dependency is defined before the `spring-boot-configuration-processor` dependency.
To do so with Maven, list the annotation processors in the required order using the `annotationProcessors` attribute of the Maven compiler plugin.
With Gradle, declare the dependencies in the `annotationProcessor` configuration in the required order.