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

loadWhenBindingWithParentContextShouldBind() — spring-boot Function Reference

Architecture documentation for the loadWhenBindingWithParentContextShouldBind() function in ConfigurationPropertiesTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  19b58f82_9b4f_f8c2_df5b_8e2517710bba["loadWhenBindingWithParentContextShouldBind()"]
  64dc82f7_d332_87b2_d807_a3ae4b4c01ae["removeSystemProperties()"]
  19b58f82_9b4f_f8c2_df5b_8e2517710bba -->|calls| 64dc82f7_d332_87b2_d807_a3ae4b4c01ae
  7dbdd22f_6929_2540_3475_c564a673879d["close()"]
  19b58f82_9b4f_f8c2_df5b_8e2517710bba -->|calls| 7dbdd22f_6929_2540_3475_c564a673879d
  05d207ba_cdfc_1f3b_359f_89b70a0aec4e["load()"]
  19b58f82_9b4f_f8c2_df5b_8e2517710bba -->|calls| 05d207ba_cdfc_1f3b_359f_89b70a0aec4e
  b3cee6d6_bfc9_cb5a_bdae_1169893d7d94["getProperty()"]
  19b58f82_9b4f_f8c2_df5b_8e2517710bba -->|calls| b3cee6d6_bfc9_cb5a_bdae_1169893d7d94
  style 19b58f82_9b4f_f8c2_df5b_8e2517710bba fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesTests.java lines 304–317

	@Test
	void loadWhenBindingWithParentContextShouldBind() {
		AnnotationConfigApplicationContext parent = load(BasicConfiguration.class, "name=parent");
		assertThat(parent.getEnvironment().getProperty("name")).isEqualTo("parent");
		this.context = new AnnotationConfigApplicationContext();
		this.context.setParent(parent);
		removeSystemProperties();
		load(new Class<?>[] { BasicConfiguration.class, BasicPropertiesConsumer.class }, "name=child");
		assertThat(this.context.getEnvironment().getProperty("name")).isEqualTo("child");
		assertThat(this.context.getBean(BasicProperties.class)).isNotNull();
		assertThat(parent.getBean(BasicProperties.class)).isNotNull();
		assertThat(this.context.getBean(BasicPropertiesConsumer.class).getName()).isEqualTo("child");
		parent.close();
	}

Domain

Subdomains

Frequently Asked Questions

What does loadWhenBindingWithParentContextShouldBind() do?
loadWhenBindingWithParentContextShouldBind() is a function in the spring-boot codebase.
What does loadWhenBindingWithParentContextShouldBind() call?
loadWhenBindingWithParentContextShouldBind() calls 4 function(s): close, getProperty, load, removeSystemProperties.

Analyze Your Own Codebase

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

Try Supermodel Free