类 CandidateComponentsIndexLoader
java.lang.Object
cn.taketoday.context.loader.CandidateComponentsIndexLoader
Candidate components index loading mechanism for internal use within the framework.
- 从以下版本开始:
- 4.0 2021/12/9 21:35
- 作者:
- Stephane Nicoll, Harry Yang
-
字段概要
字段 -
方法概要
修饰符和类型方法说明static CandidateComponentsIndexloadIndex(ClassLoader classLoader) Load and instantiate theCandidateComponentsIndexfrom "META-INF/today.components", using the given class loader.
-
字段详细资料
-
COMPONENTS_RESOURCE_LOCATION
The location to look for components.Can be present in multiple JAR files.
- 另请参阅:
-
IGNORE_INDEX
System property that instructs framework to ignore the components index, i.e. to always returnnullfromloadIndex(ClassLoader).The default is "false", allowing for regular use of the index. Switching this flag to
truefulfills a corner case scenario when an index is partially available for some libraries (or use cases) but couldn't be built for the whole application. In this case, the application context fallbacks to a regular classpath arrangement (i.e. as though no index were present at all).- 另请参阅:
-
-
方法详细资料
-
loadIndex
Load and instantiate theCandidateComponentsIndexfrom "META-INF/today.components", using the given class loader. If no index is available, returnnull.- 参数:
classLoader- the ClassLoader to use for loading (can benullto use the default)- 返回:
- the index to use or
nullif no index was found - 抛出:
IllegalArgumentException- if any module index cannot be loaded or if an error occurs while creatingCandidateComponentsIndex
-