Skip to content

Introduce Modular Spring AOT #35471

@sdeleuze

Description

@sdeleuze

This issue intends to reflect the work performed to modularize and evolve Spring AOT to make it usable with the majority of typical Spring applications running on the JVM, in synergy with the AOT cache features introduced by Project Leyden and available in Java 25.

Context

Spring AOT has been designed originally in order to make GraalVM native image support possible and efficient, but can also be used on the JVM to make Spring applications more efficient. That said, this JVM usage of Spring AOT is still pretty niche, mainly because there are side-effects like the freeze of @Configuration conditions at build time which makes sense on native, but is not really desirable on the JVM.

We also have deprecated spring-context-indexer annotation processor in Spring Framework 6.1 in #30431, mentioning Spring AOT as a replacement, but in its current incarnation it is not yet, due to the side effects mentioned above.

Spring Data is about to introduce AOT repositories which are providing an extra efficiency boost to Spring applications, but again, it requires to enable Spring AOT with side effects usually not acceptable for JVM users.

Also Java 25, which is the preferred Java version to use with our new major generation, has begin to deliver Project Leyden efficiency benefits like Ahead-of-Time Class Loading & Linking, Ahead-of-Time Command-Line Ergonomics and Ahead-of-Time Method Profiling and more is coming. The collaboration between the Spring team and the Java Platform team has shown that both Spring AOT and AOT cache works very well in synergy.

Sub-issues

Metadata

Metadata

Labels

theme: aotAn issue related to Ahead-of-time processingtype: enhancementA general enhancement

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions