Browse Source

Adapt AOTCache documentation to JEP 514

Closes gh-47274
pull/47987/head
Stéphane Nicoll 2 months ago
parent
commit
ba9afc005c
  1. 4
      spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/packaging/class-data-sharing.adoc

4
spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/packaging/class-data-sharing.adoc

@ -38,12 +38,10 @@ To use the AOT cache, you should first perform a training run on your applicatio
---- ----
$ java -Djarmode=tools -jar my-app.jar extract --destination application $ java -Djarmode=tools -jar my-app.jar extract --destination application
$ cd application $ cd application
$ java -XX:AOTMode=record -XX:AOTConfiguration=app.aotconf -Dspring.context.exit=onRefresh -jar my-app.jar $ java -XX:AOTCacheOutput=app.aot -Dspring.context.exit=onRefresh -jar my-app.jar
$ java -XX:AOTMode=create -XX:AOTConfiguration=app.aotconf -XX:AOTCache=app.aot -jar my-app.jar
---- ----
This creates an `app.aot` cache file that can be reused as long as the application is not updated. This creates an `app.aot` cache file that can be reused as long as the application is not updated.
The intermediate `app.aotconf` file is no longer needed and can be safely deleted.
To use the cache file, you need to add an extra parameter when starting the application: To use the cache file, you need to add an extra parameter when starting the application:

Loading…
Cancel
Save