Skip to content

Support AOT registration of Spring Factories #27955

Closed
@bclozel

Description

@bclozel

As seen in #27753, SpringFactoriesLoader is currently supported in Spring Native through subtitutions and complex AOT processors.

We'd like to improve SpringFactoriesLoader and allow static registration of Spring Factories, something our AOT processing could leverage and call early during application startup. Once a Factory type is registered with entries, SpringFactoriesLoader should use this entry as a pre-warmed cache and never look for additional entries in spring.factories files, skipping all the resource loading and reflection operations.

Instead of registering String instances as entries, this new contract might take Supplier instances instead, maybe mirroring the new contract to be added in #27954

Metadata

Metadata

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)theme: aotAn issue related to Ahead-of-time processing

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions