From c15ff1e83233656eeb11adac062285ec6663fe7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sz=C3=BCcs?= <127139797+balazs-szucs@users.noreply.github.com> Date: Sun, 1 Mar 2026 16:46:02 +0100 Subject: [PATCH] fix(aot): use Spring Boot exploded layer format for aot cache (#5811) --- scripts/init-without-ocr.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/init-without-ocr.sh b/scripts/init-without-ocr.sh index 079688634..e2215fffd 100755 --- a/scripts/init-without-ocr.sh +++ b/scripts/init-without-ocr.sh @@ -803,6 +803,11 @@ if [ "$AOT_GENERATE_BACKGROUND" = true ]; then generate_aot_cache "$AOT_CACHE" -cp "/app/app.jar:/app/lib/*" stirling.software.SPDF.SPDFApplication elif [ -f /app.jar ]; then generate_aot_cache "$AOT_CACHE" -jar /app.jar + elif [ -d /app/BOOT-INF ]; then + # Spring Boot exploded layer layout (produced by 'java -Djarmode=tools extract --layers'). + # The actual JAVA_CMD uses JarLauncher with default classpath = CWD (/app). + # Mirror that exactly: -cp /app resolves the same classes. + generate_aot_cache "$AOT_CACHE" -cp /app org.springframework.boot.loader.launch.JarLauncher else log "AOT: Cannot determine JAR layout; skipping cache generation." fi