Class AotFactoriesLoader
java.lang.Object
org.springframework.beans.factory.aot.AotFactoriesLoader
AOT specific factory loading mechanism for internal use within the framework.
Loads and instantiates factories of a given type from
"META-INF/spring/aot.factories" and merges them with matching beans
from a ListableBeanFactory.
- Since:
- 6.0
- Author:
- Phillip Webb
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAotFactoriesLoader(ListableBeanFactory beanFactory) Create a newAotFactoriesLoaderinstance backed by the given bean factory.AotFactoriesLoader(ListableBeanFactory beanFactory, SpringFactoriesLoader factoriesLoader) Create a newAotFactoriesLoaderinstance backed by the given bean factory and loading items from the givenSpringFactoriesLoaderrather than from "META-INF/spring/aot.factories". -
Method Summary
Modifier and TypeMethodDescription<T> List<T>Load items from factories file and merge them with any beans defined in theDefaultListableBeanFactory.
-
Field Details
-
FACTORIES_RESOURCE_LOCATION
The location to look for AOT factories.- See Also:
-
-
Constructor Details
-
AotFactoriesLoader
Create a newAotFactoriesLoaderinstance backed by the given bean factory.- Parameters:
beanFactory- the bean factory to use
-
AotFactoriesLoader
Create a newAotFactoriesLoaderinstance backed by the given bean factory and loading items from the givenSpringFactoriesLoaderrather than from "META-INF/spring/aot.factories".- Parameters:
beanFactory- the bean factory to usefactoriesLoader- the factories loader to use
-
-
Method Details
-
load
Load items from factories file and merge them with any beans defined in theDefaultListableBeanFactory.- Type Parameters:
T- the item type- Parameters:
type- the item type to load- Returns:
- a list of loaded instances
-