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

createContext() — spring-boot Function Reference

Architecture documentation for the createContext() function in ContextIdApplicationContextInitializerTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  b063c84b_6780_6f5a_930d_1d31d4793c47["createContext()"]
  4f99648a_f02e_2fee_844d_e1374cd1928c["singleContextWithDefaultName()"]
  4f99648a_f02e_2fee_844d_e1374cd1928c -->|calls| b063c84b_6780_6f5a_930d_1d31d4793c47
  c5605468_b083_eb3f_e11e_eefbfbab048f["singleContextWithCustomName()"]
  c5605468_b083_eb3f_e11e_eefbfbab048f -->|calls| b063c84b_6780_6f5a_930d_1d31d4793c47
  624a2a8a_1c6d_e60b_b84a_a9615a19aaaf["linearHierarchy()"]
  624a2a8a_1c6d_e60b_b84a_a9615a19aaaf -->|calls| b063c84b_6780_6f5a_930d_1d31d4793c47
  c4c5d59c_3d95_9294_52f0_2df8c7273e26["complexHierarchy()"]
  c4c5d59c_3d95_9294_52f0_2df8c7273e26 -->|calls| b063c84b_6780_6f5a_930d_1d31d4793c47
  bcf0a215_f821_6322_791c_1e1c142e40b3["contextWithParentWithNoContextIdFallsBackToDefaultId()"]
  bcf0a215_f821_6322_791c_1e1c142e40b3 -->|calls| b063c84b_6780_6f5a_930d_1d31d4793c47
  style b063c84b_6780_6f5a_930d_1d31d4793c47 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/context/ContextIdApplicationContextInitializerTests.java lines 91–102

	private ConfigurableApplicationContext createContext(@Nullable ConfigurableApplicationContext parent,
			String... properties) {
		ConfigurableApplicationContext context = new AnnotationConfigApplicationContext();
		TestPropertySourceUtils.addInlinedPropertiesToEnvironment(context, properties);
		if (parent != null) {
			context.setParent(parent);
		}
		this.initializer.initialize(context);
		context.refresh();
		this.contexts.add(context);
		return context;
	}

Domain

Subdomains

Called By

  • complexHierarchy()
  • contextWithParentWithNoContextIdFallsBackToDefaultId()
  • linearHierarchy()
  • singleContextWithCustomName()
  • singleContextWithDefaultName()

Frequently Asked Questions

What does createContext() do?
createContext() is a function in the spring-boot codebase.
What calls createContext()?
createContext() is called by 5 function(s): complexHierarchy, contextWithParentWithNoContextIdFallsBackToDefaultId, linearHierarchy, singleContextWithCustomName, singleContextWithDefaultName.

Analyze Your Own Codebase

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

Try Supermodel Free