From caf8cf71ffc1212b35bcb332a7062e7ec05626fd Mon Sep 17 00:00:00 2001 From: Chris Bono Date: Tue, 13 Dec 2022 09:16:07 -0600 Subject: [PATCH] Add AOT docs (#253) --- .../src/main/asciidoc/index.adoc | 2 ++ .../src/main/asciidoc/native-image.adoc | 23 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 spring-pulsar-docs/src/main/asciidoc/native-image.adoc diff --git a/spring-pulsar-docs/src/main/asciidoc/index.adoc b/spring-pulsar-docs/src/main/asciidoc/index.adoc index c034eedb..f0874741 100644 --- a/spring-pulsar-docs/src/main/asciidoc/index.adoc +++ b/spring-pulsar-docs/src/main/asciidoc/index.adoc @@ -39,3 +39,5 @@ In addition to this reference documentation, we recommend a number of other reso include::application-properties.adoc[leveloffset=+2] include::non-ga-versions.adoc[leveloffset=+2] + +include::native-image.adoc[leveloffset=+2] diff --git a/spring-pulsar-docs/src/main/asciidoc/native-image.adoc b/spring-pulsar-docs/src/main/asciidoc/native-image.adoc new file mode 100644 index 00000000..78e33b68 --- /dev/null +++ b/spring-pulsar-docs/src/main/asciidoc/native-image.adoc @@ -0,0 +1,23 @@ +[appendix] +[[appendix.native-images]] += GraalVM Native Image Support + +include::attributes.adoc[] + +https://www.graalvm.org/native-image/[GraalVM Native Images] are standalone executables that can be generated by processing compiled Java applications ahead-of-time. Native Images generally have a smaller memory footprint and start faster than their JVM counterparts. + +.Support +The required https://docs.spring.io/spring-framework/docs/current/reference/html/core.html#core.aot.hints[AOT Runtime Hints] are built-in to Spring for Apache Pulsar so that it can seamlessly be used in native image based Spring applications. + +[NOTE] +==== +The native image support in Spring for Apache Pulsar has been tested in basic scenarios, and we expect it to "just work". However, it is possible that more advanced use cases could surface the need to add additional runtime hints to your own application. If this occurs please file a {github}/issues[Github issue] with some details. +==== + +.Next Steps +If you are interested in adding native image support to your own application then an excellent place to start is the https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#native-image[Spring Boot GraalVM Support] section of the Spring Boot reference docs. + +Although there is no reference to Spring for Apache Pulsar in the aforementioned guide, you can find specific examples at the following coordinates: + +* https://github.com/spring-projects/spring-aot-smoke-tests/tree/main/integration/spring-pulsar[Spring for Apache Pulsar (imperative)] +* https://github.com/spring-projects/spring-aot-smoke-tests/tree/main/integration/spring-pulsar-reactive[Spring for Apache Pulsar (reactive)]