Introduction
The GraalVM Native Images are produced ahead-of-time using Spring ahead of time optimalizations. The AOT optimizations is meant to inspect an ApplicationContext at build time and apply decisions and discovery logic that usually happens at runtime. Doing so allows building an application startup arrangement that is more straightforward and focused on a fixed set of features.
- Static analysis of your application is performed at build-time from the main entry point.
- Code that cannot be reached when the native image is created will be removed and won’t be part of the executable.
- GraalVM is not directly aware of dynamic elements of your code and must be told about reflection, resources, serialization, and dynamic proxies.
- The application classpath is fixed at build time and cannot change.
- There is no lazy class loading, everything shipped in the executables will be loaded in memory on startup.
- There are some limitations around some aspects of Java applications that are not fully supported.