Migrating Spring Boot apps to GraalVM
summary
Migrating a Spring Boot 3+ app to GraalVM Native Image uses the native-maven/Gradle plugin, Spring AOT-generated runtime hints, the tracing agent for library metadata, and optional PGO for throughput. Expect longer builds (demo ~1m30s) and many reachable methods (~120k) but much better runtime: JVM cold start ~1.7 s vs starts in 53 ms, memory ~111 MB vs several hundred, and latency-friendly peak throughput once tuned (demo: 5,300 RPS with PGO). Watch for reflection, templating, JSON binding and Mockito test limits; use native-test and runtime hints or the agent.
AI-written summary · about
chapters (23)
- 0:00Introduction to Spring and GraalVM
- 1:20Demo: Running on JVM
- 3:40Migrating to Native Image
- 6:38Native Image Benefits
- 7:51The Closed-World Assumption
- 10:35Library Compatibility
- 11:58Spring AOT Processing
- 13:55Handling Reflection
- 16:03Metadata Configuration
- 18:23Programmatic Hints
- 21:37Serialization Challenges
- 22:57Registering Types for Binding
- 25:18Security Considerations
- 26:45Testing Native Images
- 29:47Mockito Support Update
- 30:26Testing Best Practices
- 32:29Conditional Beans
- 35:19Dynamic Behavior Techniques
- 37:00The Tracing Agent
- 38:49Agent Workflow Demo
- 42:09Packaging and Cross-Compilation
- 43:41Performance Benchmarking
- 48:14Conclusion and Summary
related talks
46mFast and Lightweight Spring Boot Applications with GraalVM
47mGoing Native: Fast and Lightweight Spring Boot Applications with GraalVM
45mGoing AOT: Everything you need to know about GraalVM for Java applications
44mNative Spring Applications with GraalVM
51mGoing AOT: Everything you need to know about GraalVM for Java applications
44mAhead Of Time and Native in Spring Boot 3.0
46mBring the Action: Using GraalVM in Production
47mBring the action: using GraalVM in production
