TypeExcludeFilterTests Class — spring-boot Architecture
Architecture documentation for the TypeExcludeFilterTests class in TypeExcludeFilterTests.java from the spring-boot codebase.
Entity Profile
Relationship Graph
Source Code
core/spring-boot/src/test/java/org/springframework/boot/context/TypeExcludeFilterTests.java lines 41–77
class TypeExcludeFilterTests {
private @Nullable AnnotationConfigApplicationContext context;
@AfterEach
void cleanUp() {
if (this.context != null) {
this.context.close();
}
}
@Test
void loadsTypeExcludeFilters() {
this.context = new AnnotationConfigApplicationContext();
this.context.getBeanFactory().registerSingleton("filter1", new WithoutMatchOverrideFilter());
this.context.getBeanFactory().registerSingleton("filter2", new SampleTypeExcludeFilter());
this.context.register(Config.class);
this.context.refresh();
assertThat(this.context.getBean(ExampleComponent.class)).isNotNull();
assertThatExceptionOfType(NoSuchBeanDefinitionException.class).isThrownBy(() -> {
assertThat(this.context).isNotNull();
this.context.getBean(ExampleFilteredComponent.class);
});
}
@Configuration(proxyBeanMethods = false)
@ComponentScan(basePackageClasses = SampleTypeExcludeFilter.class,
excludeFilters = @Filter(type = FilterType.CUSTOM, classes = SampleTypeExcludeFilter.class))
static class Config {
}
static class WithoutMatchOverrideFilter extends TypeExcludeFilter {
}
}
Domain
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free