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

parentContextCreationThatIsBuiltThenRun() — spring-boot Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  7c25eebe_682a_5b21_c5ae_1481e03cfa2f["parentContextCreationThatIsBuiltThenRun()"]
  97fa5b9e_b816_70bd_8828_99b67bc8530a["getApplicationContext()"]
  7c25eebe_682a_5b21_c5ae_1481e03cfa2f -->|calls| 97fa5b9e_b816_70bd_8828_99b67bc8530a
  6e5afbf2_5ca2_d18c_1a56_76eb4b8b8221["setParent()"]
  7c25eebe_682a_5b21_c5ae_1481e03cfa2f -->|calls| 6e5afbf2_5ca2_d18c_1a56_76eb4b8b8221
  3dc59be6_081a_34fd_0727_a7b4669b8750["assertThat()"]
  7c25eebe_682a_5b21_c5ae_1481e03cfa2f -->|calls| 3dc59be6_081a_34fd_0727_a7b4669b8750
  a443e5ce_8b4c_f3b3_fc8c_67bbd9a1b6a3["get()"]
  7c25eebe_682a_5b21_c5ae_1481e03cfa2f -->|calls| a443e5ce_8b4c_f3b3_fc8c_67bbd9a1b6a3
  ecafb7a5_4f8e_30f0_a1fa_c6d3b6fdc536["didNotRegisterApplicationContext()"]
  7c25eebe_682a_5b21_c5ae_1481e03cfa2f -->|calls| ecafb7a5_4f8e_30f0_a1fa_c6d3b6fdc536
  546343f2_f93a_0dc3_7a91_7016e75078f5["getParent()"]
  7c25eebe_682a_5b21_c5ae_1481e03cfa2f -->|calls| 546343f2_f93a_0dc3_7a91_7016e75078f5
  89cfa04a_3922_680e_945d_5b4338252cc7["run()"]
  7c25eebe_682a_5b21_c5ae_1481e03cfa2f -->|calls| 89cfa04a_3922_680e_945d_5b4338252cc7
  style 7c25eebe_682a_5b21_c5ae_1481e03cfa2f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/builder/SpringApplicationBuilderTests.java lines 153–166

	@Test
	void parentContextCreationThatIsBuiltThenRun() {
		SpringApplicationBuilder application = new SpringApplicationBuilder(ChildConfig.class)
			.contextFactory(ApplicationContextFactory.ofContextClass(SpyApplicationContext.class));
		application.parent(ExampleConfig.class);
		this.context = application.build("a=alpha").run("b=bravo");
		then(((SpyApplicationContext) this.context).getApplicationContext()).should()
			.setParent(any(ApplicationContext.class));
		assertThat(SpringApplicationShutdownHookInstance.get()).didNotRegisterApplicationContext(this.context);
		ApplicationContext parent = this.context.getParent();
		assertThat(parent).isNotNull();
		assertThat(parent.getBean(ApplicationArguments.class).getNonOptionArgs()).contains("a=alpha");
		assertThat(this.context.getBean(ApplicationArguments.class).getNonOptionArgs()).contains("b=bravo");
	}

Domain

Subdomains

Frequently Asked Questions

What does parentContextCreationThatIsBuiltThenRun() do?
parentContextCreationThatIsBuiltThenRun() is a function in the spring-boot codebase.
What does parentContextCreationThatIsBuiltThenRun() call?
parentContextCreationThatIsBuiltThenRun() calls 7 function(s): assertThat, didNotRegisterApplicationContext, get, getApplicationContext, getParent, run, setParent.

Analyze Your Own Codebase

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

Try Supermodel Free