Package org.springframework.boot.context
Class TypeExcludeFilter
java.lang.Object
org.springframework.boot.context.TypeExcludeFilter
- All Implemented Interfaces:
Aware
,BeanFactoryAware
,TypeFilter
- Direct Known Subclasses:
AnnotationCustomizableTypeExcludeFilter
Provides exclusion
TypeFilters
that are loaded from the
BeanFactory
and automatically applied to SpringBootApplication
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 the match(MetadataReader, MetadataReaderFactory)
method. They should
also implement a valid hashCode
and equals
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 support spring-boot-test
.
- Since:
- 1.4.0
- Author:
- Phillip Webb
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
boolean
match
(MetadataReader metadataReader, MetadataReaderFactory metadataReaderFactory) void
setBeanFactory
(BeanFactory beanFactory)
-
Constructor Details
-
TypeExcludeFilter
public TypeExcludeFilter()
-
-
Method Details
-
setBeanFactory
- Specified by:
setBeanFactory
in interfaceBeanFactoryAware
- Throws:
BeansException
-
match
public boolean match(MetadataReader metadataReader, MetadataReaderFactory metadataReaderFactory) throws IOException - Specified by:
match
in interfaceTypeFilter
- Throws:
IOException
-
equals
-
hashCode
public int hashCode()
-