From cf72a7c73e0606fe49eb456bc93e83623e5d538e Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Wed, 13 Nov 2024 13:52:32 -0500 Subject: [PATCH] Generate CDS archive and use it when running the application Class Data Sharing (CDS) is a JVM feature that can help reduce the startup time and memory footprint of Java applications. See: https://docs.spring.io/spring-boot/reference/packaging/class-data-sharing.html See: https://docs.spring.io/spring-boot/how-to/class-data-sharing.html#howto.class-data-sharing.buildpacks See: https://github.com/paketo-buildpacks/spring-boot/tree/v5.31.2?tab=readme-ov-file#configuration --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index a4968989f..35cc502f1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -112,7 +112,7 @@ tasks.withType().configureEach { tasks.bootBuildImage { // See: https://paketo.io/docs/howto/java/ - environment = mapOf("BP_JVM_VERSION" to "21") + environment = mapOf("BP_JVM_VERSION" to "21", "BP_JVM_CDS_ENABLED" to "true") docker { publishRegistry {