TestSpringApplication Class — spring-boot Architecture
Architecture documentation for the TestSpringApplication class in SpringApplicationTests.java from the spring-boot codebase.
Entity Profile
Relationship Graph
Source Code
core/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java lines 1602–1639
static class TestSpringApplication extends SpringApplication {
private @Nullable BeanDefinitionLoader loader;
private boolean useMockLoader;
TestSpringApplication(Class<?>... primarySources) {
super(primarySources);
}
TestSpringApplication(ResourceLoader resourceLoader, Class<?>... primarySources) {
super(resourceLoader, primarySources);
}
void setUseMockLoader(boolean useMockLoader) {
this.useMockLoader = useMockLoader;
}
@Override
protected BeanDefinitionLoader createBeanDefinitionLoader(BeanDefinitionRegistry registry, Object[] sources) {
if (this.useMockLoader) {
this.loader = mock(BeanDefinitionLoader.class);
}
else {
this.loader = spy(super.createBeanDefinitionLoader(registry, sources));
}
return this.loader;
}
@Nullable BeanDefinitionLoader getLoader() {
return this.loader;
}
Banner.Mode getBannerMode() {
return this.properties.getBannerMode(new MockEnvironment());
}
}
Domain
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free