Closed
Description
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