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

contextLoaded() — spring-boot Function Reference

Architecture documentation for the contextLoaded() function in EventPublishingRunListener.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  e9cf57fa_c896_8c00_89bc_614423cd292b["contextLoaded()"]
  a26ca185_1730_acf1_55b3_879c97843c59["contextLoaded()"]
  e9cf57fa_c896_8c00_89bc_614423cd292b -->|calls| a26ca185_1730_acf1_55b3_879c97843c59
  ab7d7a5d_2b51_950c_9190_353313bf7e19["getListeners()"]
  e9cf57fa_c896_8c00_89bc_614423cd292b -->|calls| ab7d7a5d_2b51_950c_9190_353313bf7e19
  5ef65967_feee_4217_f7a3_3599d8408c32["multicastInitialEvent()"]
  e9cf57fa_c896_8c00_89bc_614423cd292b -->|calls| 5ef65967_feee_4217_f7a3_3599d8408c32
  style e9cf57fa_c896_8c00_89bc_614423cd292b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/main/java/org/springframework/boot/context/event/EventPublishingRunListener.java lines 91–100

	@Override
	public void contextLoaded(ConfigurableApplicationContext context) {
		for (ApplicationListener<?> listener : this.application.getListeners()) {
			if (listener instanceof ApplicationContextAware contextAware) {
				contextAware.setApplicationContext(context);
			}
			context.addApplicationListener(listener);
		}
		multicastInitialEvent(new ApplicationPreparedEvent(this.application, this.args, context));
	}

Domain

Subdomains

Frequently Asked Questions

What does contextLoaded() do?
contextLoaded() is a function in the spring-boot codebase.
What does contextLoaded() call?
contextLoaded() calls 3 function(s): contextLoaded, getListeners, multicastInitialEvent.

Analyze Your Own Codebase

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

Try Supermodel Free