Home / Class/ TestCloseListener Class — spring-boot Architecture

TestCloseListener Class — spring-boot Architecture

Architecture documentation for the TestCloseListener class in DefaultBootstrapContextTests.java from the spring-boot codebase.

Entity Profile

Source Code

core/spring-boot/src/test/java/org/springframework/boot/bootstrap/DefaultBootstrapContextTests.java lines 286–307

	private static final class TestCloseListener
			implements ApplicationListener<BootstrapContextClosedEvent>, AssertProvider<CloseListenerAssert> {

		private int called;

		private @Nullable BootstrapContext bootstrapContext;

		private @Nullable ConfigurableApplicationContext applicationContext;

		@Override
		public void onApplicationEvent(BootstrapContextClosedEvent event) {
			this.called++;
			this.bootstrapContext = event.getBootstrapContext();
			this.applicationContext = event.getApplicationContext();
		}

		@Override
		public CloseListenerAssert assertThat() {
			return new CloseListenerAssert(this);
		}

	}

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free