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

addBootstrapRegistryInitializer() — spring-boot Function Reference

Architecture documentation for the addBootstrapRegistryInitializer() function in SpringApplicationBuilderTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  d8c9bff4_4d02_c352_9aa8_5602be1cefe8["addBootstrapRegistryInitializer()"]
  996a952b_218b_d435_5c6b_60ff532984a9["addBootstrapRegistryInitializer()"]
  d8c9bff4_4d02_c352_9aa8_5602be1cefe8 -->|calls| 996a952b_218b_d435_5c6b_60ff532984a9
  97fa5b9e_b816_70bd_8828_99b67bc8530a["getApplicationContext()"]
  d8c9bff4_4d02_c352_9aa8_5602be1cefe8 -->|calls| 97fa5b9e_b816_70bd_8828_99b67bc8530a
  3dc59be6_081a_34fd_0727_a7b4669b8750["assertThat()"]
  d8c9bff4_4d02_c352_9aa8_5602be1cefe8 -->|calls| 3dc59be6_081a_34fd_0727_a7b4669b8750
  f5ecfeee_2faa_bfff_05c7_ad8e17034d42["run()"]
  d8c9bff4_4d02_c352_9aa8_5602be1cefe8 -->|calls| f5ecfeee_2faa_bfff_05c7_ad8e17034d42
  style d8c9bff4_4d02_c352_9aa8_5602be1cefe8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/builder/SpringApplicationBuilderTests.java lines 327–335

	@Test
	void addBootstrapRegistryInitializer() {
		SpringApplicationBuilder application = new SpringApplicationBuilder(ExampleConfig.class)
			.web(WebApplicationType.NONE)
			.addBootstrapRegistryInitializer((context) -> context.addCloseListener(
					(event) -> event.getApplicationContext().getBeanFactory().registerSingleton("test", "spring")));
		this.context = application.run();
		assertThat(this.context.getBean("test")).isEqualTo("spring");
	}

Domain

Subdomains

Calls

Frequently Asked Questions

What does addBootstrapRegistryInitializer() do?
addBootstrapRegistryInitializer() is a function in the spring-boot codebase.
What does addBootstrapRegistryInitializer() call?
addBootstrapRegistryInitializer() calls 4 function(s): addBootstrapRegistryInitializer, assertThat, getApplicationContext, run.

Analyze Your Own Codebase

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

Try Supermodel Free