Why this matters
- Cold start and memory footprint matter for scale-to-zero on Kubernetes.
- Native images trade build time and reflection limits for startup speed.
- You should articulate when JVM mode remains the better default for BookStore.
Native image
L1 · FresherGraalVM ahead-of-time compilation produces fast-starting binaries — useful for scale-to-zero on Kubernetes.
Spring AOT
L2 · IntermediateBoot 3 AOT processing generates reflection config at build time — required for native image success.
Trade-offs
L3 · AdvancedLonger builds, limited dynamic features, and harder debugging vs JVM's mature tooling.
When JVM still wins
L4 · ExpertHeavy JIT throughput, frequent deployments without cold start, and libraries with incomplete native metadata.
Hook
BookStore edge services need sub-second cold start on AWS Lambda or minimal container images. Spring Native with GraalVM ahead-of-time compilation produces a standalone binary — at the cost of build time and reflection configuration.
Native profile and plugin
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
</plugin>
Run ./mvnw -Pnative native:compile on Java 21 with GraalVM installed. Spring Boot 3.5’s AOT processing generates reachability metadata for many starters.
The rest of this guide is part of Pro
Free covers every fresher guide in full. Pro unlocks Senior, Staff and Architect guides across every track.
Still to come · 6 sections
- What breaks reflection
- Testing native binaries
- BookStore in action
- Runnable BookStore lab
- Failure modes in production
- Memory and footprint
Test yourself
Answer these before moving on — recall is what makes it stick.