Kicking Spring Native’s Tires

I've been playing with GraalVM Ahead-Of-Time compilation capability since I became aware of it. As a long-time Spring aficionado, I carefully monitored the efforts that the engineers at Tanzu have put into making Spring AOT-compatible. Recently, they announced the beta version of the integration. In this post, I want to check how easy it is to produce a (working!) Docker image from an existing Spring Boot application.

Introduction

GraalVM provides many different features. Among them, the component known as Substrate VM allows to AOT-compile regular bytecode to a native executable. The process "walks" the application starting from the main method at build time. Substrate VM leaves out the code that it doesn't follow out from the resulting binary.