Native builds with Spring Boot 3
Talkat JCON Europe 2023 · on Tuesday, 2023-06-20· at 15:00· Cinema Blackbox, Im Mediapark 1, 50670 Köln, Germany·
summary
Spring Boot 3 compiles Spring apps to native executables using GraalVM and Spring’s AoT toolchain and the demo builds a REST + Spring Data app that runs natively after adding a resource-config.json so bundled files load. Native build takes about 2.5 minutes on a modern laptop, requires GraalVM to compile, and produces much smaller binaries (example executable ~82 MB vs shipping a 283 MB JDK image) while runtime memory drops (example ~102 MB); profiling (PGO) closes long-run throughput gaps.
AI-written summary · about
chapters (20)
- 0:00Introduction to Spring Native
- 2:06AOT vs JIT compilation
- 3:51Native frameworks in Java
- 4:57Spring Native in Spring Boot 3
- 6:21Handling resources in AOT
- 7:26Reflection and proxies setup
- 9:13Library support for GraalVM
- 12:21Live demo setup
- 13:07Building native executable
- 17:27Fixing resource inclusion
- 20:44Executable size comparison
- 23:13Running native executable
- 24:01Spring Data REST demo
- 27:41Database support in native
- 28:49Native build success
- 30:16Configuration hints for GraalVM
- 32:05Testing and development workflow
- 33:52Performance over time
- 37:13Profile-guided optimization
- 41:29Takeaways and downsides
related talks
01h 01mFrom Spring Native to Spring Boot 3
46mFast and Lightweight Spring Boot Applications with GraalVM
44mAhead Of Time and Native in Spring Boot 3.0
47mGoing Native: Fast and Lightweight Spring Boot Applications with GraalVM
44mNative Spring Applications with GraalVM
51mMigrating Spring Boot apps to GraalVM
40mThe Path Towards Spring Boot Native Applications on GraalVM
53mBootiful GraalVM
