Skip to content

Commit

Permalink
Merge pull request #41464 from sdeleuze
Browse files Browse the repository at this point in the history
* gh-41464:
  Refine CDS how-to guide

Closes gh-41464
  • Loading branch information
wilkinsona committed Jul 12, 2024
2 parents 129d146 + 75e642e commit e053f13
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ Spring Boot's xref:reference:packaging/container-images/cloud-native-buildpacks.
To enable CDS optimization in a generated Docker image, the buildpack environment variable `BP_JVM_CDS_ENABLED` should be set to `true` when building the image as described in the xref:maven-plugin:build-image.adoc#build-image.examples.builder-configuration[Maven plugin] and xref:gradle-plugin:packaging-oci-image.adoc#build-image.examples.builder-configuration[Gradle plugin] documentation.
This will cause the buildpack to do a training run of the application, save the CDS archive in the image, and use the CDS archive when launching the application.

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, 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]]
Expand Down

0 comments on commit e053f13

Please sign in to comment.