Skip to content

Commit d5385a7

Browse files
committed
Merge branch '2.2.x' into 2.3.x
Closes gh-22023
2 parents 136c9b1 + 97af782 commit d5385a7

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/appendix-configuration-metadata.adoc

+24
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,30 @@ With Maven the dependency should be declared as optional, as shown in the follow
708708
</dependency>
709709
----
710710

711+
If you have defined `@ConfigurationProperties` in your application, make sure to configure the `spring-boot-maven-plugin` to prevent the `repackage` goal from adding the dependency into the fat jar:
712+
713+
[source,xml,indent=0,subs="verbatim,quotes,attributes"]
714+
----
715+
<project>
716+
<build>
717+
<plugins>
718+
<plugin>
719+
<groupId>org.springframework.boot</groupId>
720+
<artifactId>spring-boot-maven-plugin</artifactId>
721+
<configuration>
722+
<excludes>
723+
<exclude>
724+
<groupId>org.springframework.boot</groupId>
725+
<artifactId>spring-boot-configuration-processor</artifactId>
726+
</exclude>
727+
</excludes>
728+
</configuration>
729+
</plugin>
730+
</plugins>
731+
</build>
732+
</project>
733+
----
734+
711735
With Gradle 4.5 and earlier, the dependency should be declared in the `compileOnly` configuration, as shown in the following example:
712736

713737
[source,groovy,indent=0,subs="verbatim,quotes,attributes"]

spring-boot-project/spring-boot-docs/src/docs/asciidoc/spring-boot-features.adoc

+24
Original file line numberDiff line numberDiff line change
@@ -7934,6 +7934,30 @@ It is recommended to add the following dependency in a module that contains auto
79347934
</dependency>
79357935
----
79367936

7937+
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 fat jar:
7938+
7939+
[source,xml,indent=0,subs="verbatim,quotes,attributes"]
7940+
----
7941+
<project>
7942+
<build>
7943+
<plugins>
7944+
<plugin>
7945+
<groupId>org.springframework.boot</groupId>
7946+
<artifactId>spring-boot-maven-plugin</artifactId>
7947+
<configuration>
7948+
<excludes>
7949+
<exclude>
7950+
<groupId>org.springframework.boot</groupId>
7951+
<artifactId>spring-boot-autoconfigure-processor</artifactId>
7952+
</exclude>
7953+
</excludes>
7954+
</configuration>
7955+
</plugin>
7956+
</plugins>
7957+
</build>
7958+
</project>
7959+
----
7960+
79377961
With Gradle 4.5 and earlier, the dependency should be declared in the `compileOnly` configuration, as shown in the following example:
79387962

79397963
[source,groovy,indent=0,subs="verbatim,quotes,attributes"]

0 commit comments

Comments
 (0)