Home / Function/ initialEventListenerCanAddAdditionalListenersToApplication() — spring-boot Function Reference

initialEventListenerCanAddAdditionalListenersToApplication() — spring-boot Function Reference

Architecture documentation for the initialEventListenerCanAddAdditionalListenersToApplication() function in EventPublishingRunListenerTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  0a0d8d00_2be1_d01a_442c_1649c0f94f8a["initialEventListenerCanAddAdditionalListenersToApplication()"]
  16b51c89_dde4_bfa7_4c6d_cd813dd33ba3["SpringApplication()"]
  0a0d8d00_2be1_d01a_442c_1649c0f94f8a -->|calls| 16b51c89_dde4_bfa7_4c6d_cd813dd33ba3
  0323724f_be4b_210b_5a14_3dfe10f6563b["addListeners()"]
  0a0d8d00_2be1_d01a_442c_1649c0f94f8a -->|calls| 0323724f_be4b_210b_5a14_3dfe10f6563b
  58693b90_5c44_e232_8ac7_ef1866400e09["assertReceivedEvent()"]
  0a0d8d00_2be1_d01a_442c_1649c0f94f8a -->|calls| 58693b90_5c44_e232_8ac7_ef1866400e09
  style 0a0d8d00_2be1_d01a_442c_1649c0f94f8a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/context/event/EventPublishingRunListenerTests.java lines 75–88

	@Test
	void initialEventListenerCanAddAdditionalListenersToApplication() {
		SpringApplication application = new SpringApplication();
		DefaultBootstrapContext bootstrapContext = new DefaultBootstrapContext();
		ConfigurableEnvironment environment = new StandardEnvironment();
		TestApplicationListener lateAddedApplicationListener = new TestApplicationListener();
		ApplicationListener<ApplicationStartingEvent> listener = (event) -> event.getSpringApplication()
			.addListeners(lateAddedApplicationListener);
		application.addListeners(listener);
		EventPublishingRunListener runListener = new EventPublishingRunListener(application, NO_ARGS);
		runListener.starting(bootstrapContext);
		runListener.environmentPrepared(bootstrapContext, environment);
		lateAddedApplicationListener.assertReceivedEvent(ApplicationEnvironmentPreparedEvent.class);
	}

Domain

Subdomains

Calls

Frequently Asked Questions

What does initialEventListenerCanAddAdditionalListenersToApplication() do?
initialEventListenerCanAddAdditionalListenersToApplication() is a function in the spring-boot codebase.
What does initialEventListenerCanAddAdditionalListenersToApplication() call?
initialEventListenerCanAddAdditionalListenersToApplication() calls 3 function(s): SpringApplication, addListeners, assertReceivedEvent.

Analyze Your Own Codebase

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

Try Supermodel Free