From 27c6f9f30d59d41ba5de36568c2b6e8d937af73a Mon Sep 17 00:00:00 2001 From: Glenn Renfro Date: Tue, 4 Oct 2022 14:10:25 -0400 Subject: [PATCH] Added documentation for natively using Single Instance Enabled --- docs/src/main/asciidoc/features.adoc | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/src/main/asciidoc/features.adoc b/docs/src/main/asciidoc/features.adoc index a4e7ecf0..f03298b8 100644 --- a/docs/src/main/asciidoc/features.adoc +++ b/docs/src/main/asciidoc/features.adoc @@ -389,6 +389,29 @@ application: NOTE: The exit code for the application will be 1 if the task fails because this feature is enabled and another task is running with the same task name. +==== Single Instance Usage for Spring AOT And Native Compilation +To utilize Spring Cloud Task's single instance feature when creating a natively compiled app, the feature needs to enabled at build time. +This is done by adding the `process-aot` execution and setting the `spring.cloud.task.single-step-instance-enabled=true` as a JVM argument as shown below: + +[source,xml] + + org.springframework.boot + spring-boot-maven-plugin + + + process-aot + + process-aot + + + + -Dspring.cloud.task.single-instance-enabled=true + + + + + + === Enabling Micrometer Metrics and Observations for Spring Cloud Task Spring Cloud Task captures the following metrics with the following fields: