You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/developing-auto-configuration.adoc
+7-18
Original file line number
Diff line number
Diff line change
@@ -283,34 +283,23 @@ If you do it that way, the library is not provided and, by default, Spring Boot
283
283
Spring Boot uses an annotation processor to collect the conditions on auto-configurations in a metadata file (`META-INF/spring-autoconfigure-metadata.properties`).
284
284
If that file is present, it is used to eagerly filter auto-configurations that do not match, which will improve startup time.
285
285
286
-
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:
286
+
When building with Maven, configure the compiler plugin (3.12.0 or later) to add `spring-boot-autoconfigure-processor` to the annotation processor paths:
Copy file name to clipboardexpand all lines: spring-boot-project/spring-boot-docs/src/docs/antora/modules/specification/pages/configuration-metadata/annotation-processor.adoc
+22-11
Original file line number
Diff line number
Diff line change
@@ -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`.
13
-
14
-
With Maven the dependency should be declared as optional, as shown in the following example:
12
+
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:
36
+
With Gradle, a dependency should be declared in the `annotationProcessor` configuration, as shown in the following example:
26
37
27
38
[source,gradle]
28
39
----
@@ -64,8 +75,8 @@ You could also let the AspectJ plugin run all the processing and disable annotat
64
75
[NOTE]
65
76
====
66
77
If you are using Lombok in your project, you need to make sure that its annotation processor runs before `spring-boot-configuration-processor`.
67
-
To do so with Maven, you can list the annotation processors in the right order using the `annotationProcessors` attribute of the Maven compiler plugin.
68
-
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.
78
+
To do so with Maven, list the annotation processors in the required order using the `annotationProcessors` attribute of the Maven compiler plugin.
79
+
With Gradle, declare the dependencies in the `annotationProcessor` configuration in the required order.
0 commit comments