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

checkOrderOfInitializer() — spring-boot Function Reference

Architecture documentation for the checkOrderOfInitializer() function in SharedMetadataReaderFactoryContextInitializerTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  331ddf37_e3b6_ebc3_6f9a_3de93fb51658["checkOrderOfInitializer()"]
  16b51c89_dde4_bfa7_4c6d_cd813dd33ba3["SpringApplication()"]
  331ddf37_e3b6_ebc3_6f9a_3de93fb51658 -->|calls| 16b51c89_dde4_bfa7_4c6d_cd813dd33ba3
  9fc735d3_f2de_a77c_c1a1_abf218992bd6["setWebApplicationType()"]
  331ddf37_e3b6_ebc3_6f9a_3de93fb51658 -->|calls| 9fc735d3_f2de_a77c_c1a1_abf218992bd6
  f5ecfeee_2faa_bfff_05c7_ad8e17034d42["run()"]
  331ddf37_e3b6_ebc3_6f9a_3de93fb51658 -->|calls| f5ecfeee_2faa_bfff_05c7_ad8e17034d42
  style 331ddf37_e3b6_ebc3_6f9a_3de93fb51658 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/SharedMetadataReaderFactoryContextInitializerTests.java lines 51–65

	@Test
	@SuppressWarnings("unchecked")
	void checkOrderOfInitializer() {
		SpringApplication application = new SpringApplication(TestConfig.class);
		application.setWebApplicationType(WebApplicationType.NONE);
		List<ApplicationContextInitializer<?>> initializers = (List<ApplicationContextInitializer<?>>) ReflectionTestUtils
			.getField(application, "initializers");
		// Simulate what would happen if an initializer was added using spring.factories
		// and happened to be loaded first
		assertThat(initializers).isNotNull();
		initializers.add(0, new Initializer());
		GenericApplicationContext context = (GenericApplicationContext) application.run();
		BeanDefinition definition = context.getBeanDefinition(SharedMetadataReaderFactoryContextInitializer.BEAN_NAME);
		assertThat(definition.getAttribute("seen")).isEqualTo(true);
	}

Domain

Subdomains

Frequently Asked Questions

What does checkOrderOfInitializer() do?
checkOrderOfInitializer() is a function in the spring-boot codebase.
What does checkOrderOfInitializer() call?
checkOrderOfInitializer() calls 3 function(s): SpringApplication, run, setWebApplicationType.

Analyze Your Own Codebase

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

Try Supermodel Free