类 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 AnnotationAttributes
getAttributes
(AnnotationMetadata metadata) Return the appropriateAnnotationAttributes
from theAnnotationMetadata
.getAutoConfigurationEntry
(AnnotationMetadata annotationMetadata) Return theAutoConfigurationImportSelector.AutoConfigurationEntry
based on theAnnotationMetadata
of the importing@Configuration
class.protected List
<AutoConfigurationImportFilter> protected List
<AutoConfigurationImportListener> protected ClassLoader
protected final ConfigurableListableBeanFactory
getCandidateConfigurations
(AnnotationMetadata metadata, AnnotationAttributes attributes) Return the auto-configuration class names that should be considered.protected final Environment
Returns the auto-configurations excluded by thespring.autoconfigure.exclude
property.getExclusions
(AnnotationMetadata metadata, AnnotationAttributes attributes) Return any exclusions that limit the candidate configurations.Class
<? extends DeferredImportSelector.Group> int
getOrder()
protected final ResourceLoader
protected void
handleInvalidExcludes
(List<String> invalidExcludes) Handle any invalid excludes that have been specified.protected boolean
isEnabled
(AnnotationMetadata metadata) protected final <T> List
<T> removeDuplicates
(List<T> list) String[]
selectImports
(AnnotationMetadata annotationMetadata) void
setBeanClassLoader
(ClassLoader classLoader) void
setBeanFactory
(BeanFactory beanFactory) void
setEnvironment
(Environment environment) void
setResourceLoader
(ResourceLoader resourceLoader)
-
构造器详细资料
-
AutoConfigurationImportSelector
public AutoConfigurationImportSelector()
-
-
方法详细资料
-
selectImports
- 指定者:
selectImports
在接口中ImportSelector
-
getExclusionFilter
- 指定者:
getExclusionFilter
在接口中ImportSelector
-
getAutoConfigurationEntry
protected AutoConfigurationImportSelector.AutoConfigurationEntry getAutoConfigurationEntry(AnnotationMetadata annotationMetadata) Return theAutoConfigurationImportSelector.AutoConfigurationEntry
based on theAnnotationMetadata
of the importing@Configuration
class.- 参数:
annotationMetadata
- the annotation metadata of the configuration class- 返回:
- the auto-configurations that should be imported
-
getImportGroup
- 指定者:
getImportGroup
在接口中DeferredImportSelector
-
isEnabled
-
getAttributes
Return the appropriateAnnotationAttributes
from 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.exclude
property.- 返回:
- 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()
-