类 AutoConfigurationImportSelector
java.lang.Object
org.springframework.boot.autoconfigure.AutoConfigurationImportSelector
- 所有已实现的接口:
Aware,BeanClassLoaderAware,BeanFactoryAware,DeferredImportSelector,ImportSelector,EnvironmentAware,ResourceLoaderAware,Ordered
public class AutoConfigurationImportSelector
extends Object
implements DeferredImportSelector, BeanClassLoaderAware, ResourceLoaderAware, BeanFactoryAware, EnvironmentAware, Ordered
DeferredImportSelector to handle auto-configuration. This class can also be subclassed if a custom variant of
@EnableAutoConfiguration is needed.- 从以下版本开始:
- 1.3.0
- 作者:
- Phillip Webb, Andy Wilkinson, Stephane Nicoll, Madhura Bhave, Moritz Halbritter, Scott Frederick
- 另请参阅:
-
嵌套类概要
嵌套类从接口继承的嵌套类/接口 org.springframework.context.annotation.DeferredImportSelector
DeferredImportSelector.Group -
字段概要
从接口继承的字段 org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明asList(AnnotationAttributes attributes, String name) protected Class<?> Return the source annotation class used by the selector.protected AnnotationAttributesgetAttributes(AnnotationMetadata metadata) Return the appropriateAnnotationAttributesfrom theAnnotationMetadata.getAutoConfigurationEntry(AnnotationMetadata annotationMetadata) Return theAutoConfigurationImportSelector.AutoConfigurationEntrybased on theAnnotationMetadataof the importing@Configurationclass.protected List<AutoConfigurationImportFilter> protected List<AutoConfigurationImportListener> protected ClassLoaderprotected final ConfigurableListableBeanFactorygetCandidateConfigurations(AnnotationMetadata metadata, AnnotationAttributes attributes) Return the auto-configuration class names that should be considered.protected final EnvironmentReturns the auto-configurations excluded by thespring.autoconfigure.excludeproperty.getExclusions(AnnotationMetadata metadata, AnnotationAttributes attributes) Return any exclusions that limit the candidate configurations.Class<? extends DeferredImportSelector.Group> intgetOrder()protected final ResourceLoaderprotected voidhandleInvalidExcludes(List<String> invalidExcludes) Handle any invalid excludes that have been specified.protected booleanisEnabled(AnnotationMetadata metadata) protected final <T> List<T> removeDuplicates(List<T> list) String[]selectImports(AnnotationMetadata annotationMetadata) voidsetBeanClassLoader(ClassLoader classLoader) voidsetBeanFactory(BeanFactory beanFactory) voidsetEnvironment(Environment environment) voidsetResourceLoader(ResourceLoader resourceLoader)
-
构造器详细资料
-
AutoConfigurationImportSelector
public AutoConfigurationImportSelector()
-
-
方法详细资料
-
selectImports
- 指定者:
selectImports在接口中ImportSelector
-
getExclusionFilter
- 指定者:
getExclusionFilter在接口中ImportSelector
-
getAutoConfigurationEntry
protected AutoConfigurationImportSelector.AutoConfigurationEntry getAutoConfigurationEntry(AnnotationMetadata annotationMetadata) Return theAutoConfigurationImportSelector.AutoConfigurationEntrybased on theAnnotationMetadataof the importing@Configurationclass.- 参数:
annotationMetadata- the annotation metadata of the configuration class- 返回:
- the auto-configurations that should be imported
-
getImportGroup
- 指定者:
getImportGroup在接口中DeferredImportSelector
-
isEnabled
-
getAttributes
Return the appropriateAnnotationAttributesfrom theAnnotationMetadata. By default this method will return attributes forgetAnnotationClass().- 参数:
metadata- the annotation metadata- 返回:
- annotation attributes
-
getAnnotationClass
Return the source annotation class used by the selector.- 返回:
- the annotation class
-
getCandidateConfigurations
protected List<String> getCandidateConfigurations(AnnotationMetadata metadata, AnnotationAttributes attributes) Return the auto-configuration class names that should be considered. By default, this method will load candidates usingImportCandidates.- 参数:
metadata- the source metadataattributes- theannotation attributes- 返回:
- a list of candidate configurations
-
handleInvalidExcludes
Handle any invalid excludes that have been specified.- 参数:
invalidExcludes- the list of invalid excludes (will always have at least one element)
-
getExclusions
Return any exclusions that limit the candidate configurations.- 参数:
metadata- the source metadataattributes- theannotation attributes- 返回:
- exclusions or an empty set
-
getExcludeAutoConfigurationsProperty
Returns the auto-configurations excluded by thespring.autoconfigure.excludeproperty.- 返回:
- excluded auto-configurations
- 从以下版本开始:
- 2.3.2
-
getAutoConfigurationImportFilters
-
removeDuplicates
-
asList
-
getAutoConfigurationImportListeners
-
setBeanFactory
- 指定者:
setBeanFactory在接口中BeanFactoryAware- 抛出:
BeansException
-
getBeanFactory
-
setBeanClassLoader
- 指定者:
setBeanClassLoader在接口中BeanClassLoaderAware
-
getBeanClassLoader
-
setEnvironment
- 指定者:
setEnvironment在接口中EnvironmentAware
-
getEnvironment
-
setResourceLoader
- 指定者:
setResourceLoader在接口中ResourceLoaderAware
-
getResourceLoader
-
getOrder
public int getOrder()
-