SpyApplicationContext Class — spring-boot Architecture
Architecture documentation for the SpyApplicationContext class in SpringApplicationBuilderTests.java from the spring-boot codebase.
Entity Profile
Relationship Graph
Source Code
core/spring-boot/src/test/java/org/springframework/boot/builder/SpringApplicationBuilderTests.java lines 381–417
static class SpyApplicationContext extends AnnotationConfigApplicationContext {
private final ConfigurableApplicationContext applicationContext = spy(new AnnotationConfigApplicationContext());
private @Nullable ResourceLoader resourceLoader;
@Override
public void setParent(@Nullable ApplicationContext parent) {
this.applicationContext.setParent(parent);
}
ConfigurableApplicationContext getApplicationContext() {
return this.applicationContext;
}
@Override
public void setResourceLoader(ResourceLoader resourceLoader) {
super.setResourceLoader(resourceLoader);
this.resourceLoader = resourceLoader;
}
@Nullable ResourceLoader getResourceLoader() {
return this.resourceLoader;
}
@Override
public void close() {
super.close();
this.applicationContext.close();
}
@Override
public @Nullable ApplicationContext getParent() {
return this.applicationContext.getParent();
}
}
Domain
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free