From 69a5a7fbe51350f5491a762d617e0b6d106fa70c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrzej=20Le=C5=9Bkiewicz?= Date: Wed, 28 Sep 2022 11:58:58 +0200 Subject: [PATCH 1/3] Update docs about shade-plugin-setup and Boot 2.7 Add transformers for new auto configuration files introduced in Spring Boot 2.7. Update info about transformers not being required, if spring-boot-starter-parent is used https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.7-Release-Notes#building-jars-with-maven-shade-plugin-and-gradle-shadow-plugin --- docs/src/main/asciidoc/adapters/aws-intro.adoc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/src/main/asciidoc/adapters/aws-intro.adoc b/docs/src/main/asciidoc/adapters/aws-intro.adoc index d8c68efe5..009355daa 100644 --- a/docs/src/main/asciidoc/adapters/aws-intro.adoc +++ b/docs/src/main/asciidoc/adapters/aws-intro.adoc @@ -106,8 +106,7 @@ manifest, using the `Start-Class` attribute (which will be added for you by the tooling if you use the starter parent). If there is no `Start-Class` in your manifest you can use an environment variable or system property `MAIN_CLASS` when you deploy the function to AWS. -If you are not using the functional bean definitions but relying on Spring Boot's auto-configuration, -then additional transformers must be configured as part of the maven-shade-plugin execution. +If you are not using the functional bean definitions but relying on Spring Boot's auto-configuration, and are not depending on `spring-boot-starter-parent`, then additional transformers must be configured as part of the maven-shade-plugin execution. [[shade-plugin-setup]] [source, xml] @@ -119,7 +118,7 @@ then additional transformers must be configured as part of the maven-shade-plugi org.springframework.boot spring-boot-maven-plugin - 2.7.1 + 2.7.4 @@ -138,6 +137,12 @@ then additional transformers must be configured as part of the maven-shade-plugi META-INF/spring.factories + + META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports + + + META-INF/spring/org.springframework.boot.actuate.autoconfigure.web.ManagementContextConfiguration.imports + META-INF/spring.schemas From bdf6d3784140bfa6e1ec65508f5680409b9e43c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrzej=20Le=C5=9Bkiewicz?= Date: Wed, 28 Sep 2022 12:04:24 +0200 Subject: [PATCH 2/3] Change line breaks --- docs/src/main/asciidoc/adapters/aws-intro.adoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/src/main/asciidoc/adapters/aws-intro.adoc b/docs/src/main/asciidoc/adapters/aws-intro.adoc index 009355daa..e758a74dd 100644 --- a/docs/src/main/asciidoc/adapters/aws-intro.adoc +++ b/docs/src/main/asciidoc/adapters/aws-intro.adoc @@ -106,7 +106,9 @@ manifest, using the `Start-Class` attribute (which will be added for you by the tooling if you use the starter parent). If there is no `Start-Class` in your manifest you can use an environment variable or system property `MAIN_CLASS` when you deploy the function to AWS. -If you are not using the functional bean definitions but relying on Spring Boot's auto-configuration, and are not depending on `spring-boot-starter-parent`, then additional transformers must be configured as part of the maven-shade-plugin execution. +If you are not using the functional bean definitions but relying on Spring Boot's auto-configuration, +and are not depending on `spring-boot-starter-parent`, +then additional transformers must be configured as part of the maven-shade-plugin execution. [[shade-plugin-setup]] [source, xml] From b9eebb69e556f69986033c7b41bcd0a91cb30766 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrzej=20Le=C5=9Bkiewicz?= Date: Wed, 28 Sep 2022 12:24:05 +0200 Subject: [PATCH 3/3] Update Gradle Shadow Plugin exampe Add `META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports` and `META-INF/spring/org.springframework.boot.actuate.autoconfigure.web.ManagementContextConfiguration.imports` --- docs/src/main/asciidoc/adapters/aws-intro.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/src/main/asciidoc/adapters/aws-intro.adoc b/docs/src/main/asciidoc/adapters/aws-intro.adoc index e758a74dd..3a1fb2287 100644 --- a/docs/src/main/asciidoc/adapters/aws-intro.adoc +++ b/docs/src/main/asciidoc/adapters/aws-intro.adoc @@ -241,6 +241,8 @@ shadowJar { append 'META-INF/spring.handlers' append 'META-INF/spring.schemas' append 'META-INF/spring.tooling' + append 'META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports' + append 'META-INF/spring/org.springframework.boot.actuate.autoconfigure.web.ManagementContextConfiguration.imports' transform(PropertiesFileTransformer) { paths = ['META-INF/spring.factories'] mergeStrategy = "append"