Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion framework-docs/modules/ROOT/pages/integration/aot-cache.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ JVM flag to start then exit your Spring application once the
--
[tabs]
======
AOT cache::
AOT cache (Java 24)::
+
[source,bash,subs="verbatim,quotes"]
----
Expand All @@ -45,6 +45,13 @@ java -XX:AOTMode=record -XX:AOTConfiguration=app.aotconf -Dspring.context.exit=o
java -XX:AOTMode=create -XX:AOTConfiguration=app.aotconf -XX:AOTCache=app.aot ...
----

AOT cache (Java 25+)::
+
[source,bash,subs="verbatim,quotes"]
----
java -XX:AOTCacheOutput=app.aot -Dspring.context.exit=onRefresh -jar application.jar ...
----

CDS::
+
[source,bash,subs="verbatim,quotes"]
Expand All @@ -55,6 +62,10 @@ java -XX:ArchiveClassesAtExit=app.jsa -Dspring.context.exit=onRefresh ...
======
--

NOTE: Note, however, that AOT cache among other things stores the method profiling information.
Therefore, it is generally recommended to create an AOT cache for an application that experienced
a portion of a production-like workflow. This way you can ensure that created AOT cache is more accurate.

== Using the cache

Once the cache file has been created, you can use it to start your application faster:
Expand Down