- Understanding native executables with GraalVM
- Building native images with Spring Boot 3
- Testing native applications
- Packaging native applications
- Explore the application business logic and Gradle configuration.
- Install GraalVM as described in the next section.
- Compile the Spring Boot 3 application with GraalVM (command:
./gradlew nativeCompile
) . - Run the native executable and test the application works as intended (command:
/build/nativeCompile/05-demo
). - Test the application as a native executable (command:
./gradlew nativeTest
). - Containerize the application as a native executable (command:
./gradlew bootBuildImage
). - Run the container on Docker and test the application works as intended.
You can install GraalVM using sdkman.
sdk install java 22.3.r17-grl
Configure your current terminal shell to use GraalVM as the Java distribution.
sdk use java 22.3.r17-grl
Next, install the native-image component from GraalVM.
gu install native-image