From 9677d9ecd465178d996eb9efc5fc711a66d56ff3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deleuze?= Date: Mon, 10 Jun 2024 15:02:27 +0200 Subject: [PATCH 1/2] Add CDS training run documentation See gh-41045 --- .../docs/antora/modules/how-to/pages/class-data-sharing.adoc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/class-data-sharing.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/class-data-sharing.adoc index a00e21d983d..91f098cfce6 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/class-data-sharing.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/class-data-sharing.adoc @@ -15,6 +15,9 @@ This will cause the buildpack to do a training run of the application, save the The buildpack environment variable `BP_SPRING_AOT_ENABLED` can also be set to `true` to enable AOT mode along with CDS when running an application that has been xref:reference:packaging/aot.adoc[built with Ahead-of-Time processed]. -The Paketo Buildpack for Spring Boot https://github.com/paketo-buildpacks/spring-boot?tab=readme-ov-file#configuration[documentation] has information on other configuration options that can be enabled with builder environment variables. +The Paketo Buildpack for Spring Boot https://github.com/paketo-buildpacks/spring-boot?tab=readme-ov-file#configuration[documentation] has information on other configuration options that can be enabled with builder environment variables, like `CDS_TRAINING_JAVA_TOOL_OPTIONS` that allows to override the default `JAVA_TOOL_OPTIONS`, only for the CDS training run. +[[howto.class-data-sharing.training-run-configuration]] +== Preventing remote services interaction during the training run +When performing the training run, it may be needed to customize the Spring Boot application configuration in order to prevent connection to remote services that may happen before the Spring lifecycle is started. This can typically happen with early database interactions and can be handled via related configuration that can be applied by default to your application or specifically to the training run to prevent such interaction, see https://github.com/spring-projects/spring-lifecycle-smoke-tests/blob/main/README.adoc#training-run-configuration[related documentation]. From d633f2e09ec83c5ae387369f746cea0360cbf550 Mon Sep 17 00:00:00 2001 From: Moritz Halbritter Date: Tue, 11 Jun 2024 14:59:06 +0200 Subject: [PATCH 2/2] Polish "Add CDS training run documentation" See gh-41045 --- .../docs/antora/modules/how-to/pages/class-data-sharing.adoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/class-data-sharing.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/class-data-sharing.adoc index 91f098cfce6..5a07a81f2dd 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/class-data-sharing.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/class-data-sharing.adoc @@ -20,4 +20,5 @@ The Paketo Buildpack for Spring Boot https://github.com/paketo-buildpacks/spring [[howto.class-data-sharing.training-run-configuration]] == Preventing remote services interaction during the training run -When performing the training run, it may be needed to customize the Spring Boot application configuration in order to prevent connection to remote services that may happen before the Spring lifecycle is started. This can typically happen with early database interactions and can be handled via related configuration that can be applied by default to your application or specifically to the training run to prevent such interaction, see https://github.com/spring-projects/spring-lifecycle-smoke-tests/blob/main/README.adoc#training-run-configuration[related documentation]. +When performing the training run, it may be needed to customize the Spring Boot application configuration to prevent connections to remote services that may happen before the Spring lifecycle is started. +This can typically happen with early database interactions and can be handled via related configuration that can be applied by default to your application (or specifically to the training run) to prevent such interactions, see https://github.com/spring-projects/spring-lifecycle-smoke-tests/blob/main/README.adoc#training-run-configuration[related documentation].