RunListener Class — spring-boot Architecture
Architecture documentation for the RunListener class in SpringApplication.java from the spring-boot codebase.
Entity Profile
Relationship Graph
Source Code
core/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java lines 1549–1569
private static final class RunListener implements SpringApplicationRunListener, Running {
private final List<ConfigurableApplicationContext> contexts = Collections
.synchronizedList(new ArrayList<>());
@Override
public void contextLoaded(ConfigurableApplicationContext context) {
this.contexts.add(context);
}
@Override
public ConfigurableApplicationContext getApplicationContext() {
List<ConfigurableApplicationContext> rootContexts = this.contexts.stream()
.filter((context) -> context.getParent() == null)
.toList();
Assert.state(!rootContexts.isEmpty(), "No root application context located");
Assert.state(rootContexts.size() == 1, "No unique root application context located");
return rootContexts.get(0);
}
}
Domain
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free