Spring Data 4.0 introduces Ahead-of-Time (AOT) repositories that generate actual source code for repository query methods at build time instead of runtime. By enabling spring.aot.repositories.enabled=true, the framework converts repository interfaces into concrete implementations with the exact same code developers would write manually. This optimization reduces application startup time and memory usage by moving query parsing and method generation from runtime to build time. The feature is currently available as a preview for JPA (Hibernate) and MongoDB, with more data stores planned for future releases.
Sort: