类 TypeExcludeFilter
- java.lang.Object
- org.springframework.boot.context.TypeExcludeFilter
- 所有已实现的接口:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanFactoryAware
,org.springframework.core.type.filter.TypeFilter
public class TypeExcludeFilter extends Object implements org.springframework.core.type.filter.TypeFilter, org.springframework.beans.factory.BeanFactoryAware
Provides exclusionTypeFilters
that are loaded from theBeanFactory
and automatically applied toSpringBootApplication
scanning. Can also be used directly with@ComponentScan
as follows:@ComponentScan(excludeFilters = @Filter(type = FilterType.CUSTOM, classes = TypeExcludeFilter.class))
Implementations should provide a subclass registered with
BeanFactory
and override thematch(MetadataReader, MetadataReaderFactory)
method. They should also implement a validhashCode
andequals
methods so that they can be used as part of Spring test's application context caches.Note that
TypeExcludeFilters
are initialized very early in the application lifecycle, they should generally not have dependencies on any other beans. They are primarily used internally to supportspring-boot-test
.- 从以下版本开始:
- 1.4.0
构造器概要
构造器 构造器 说明 TypeExcludeFilter()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 boolean
equals(Object obj)
int
hashCode()
boolean
match(org.springframework.core.type.classreading.MetadataReader metadataReader, org.springframework.core.type.classreading.MetadataReaderFactory metadataReaderFactory)
void
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
构造器详细资料
TypeExcludeFilter
public TypeExcludeFilter()
方法详细资料
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException
- 指定者:
setBeanFactory
在接口中org.springframework.beans.factory.BeanFactoryAware
- 抛出:
org.springframework.beans.BeansException
match
public boolean match(org.springframework.core.type.classreading.MetadataReader metadataReader, org.springframework.core.type.classreading.MetadataReaderFactory metadataReaderFactory) throws IOException
- 指定者:
match
在接口中org.springframework.core.type.filter.TypeFilter
- 抛出:
IOException