GraalVM Native Image Support

GraalVM Native Images 是独立的可执行文件,可以通过预先处理已编译的 Java 应用程序来生成。本机映像通常具有较小的内存占用空间,并且启动速度比其 JVM 对应项更快。

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

必需的 AOT Runtime Hints 内置到用于 Apache Pulsar 的 Spring 中,以便它可以无缝地用于基于本机映像的 Spring 应用程序。

Support

The required AOT Runtime Hints are built-in to Spring for Apache Pulsar so that it can seamlessly be used in native image based Spring applications.

Spring 对 Apache Pulsar 的原生映像支持已经在基本场景中经过测试,我们期望它“正常运行”。然而,更高级别的用例可能会要求为您的应用程序添加其他运行时提示。如果发生了此情况,请提交一个提供一些详细信息的{github}/issues[Github 问题]。

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

如果你有兴趣为自己的应用程序添加本机映像支持,那么一个很好的起点是 Spring Boot 参考文档的 Spring Boot GraalVM Support 部分。

Next Steps

If you are interested in adding native image support to your own application then an excellent place to start is the Spring Boot GraalVM Support section of the Spring Boot reference docs.

尽管在上述指南中未提及 Spring for Apache Pulsar,但您可以在以下坐标中找到具体示例:

Although there is no reference to Spring for Apache Pulsar in the aforementioned guide, you can find specific examples at the following coordinates: