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

parentWithDifferentProfile() — spring-boot Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  c840bba8_cffb_2788_ba85_278a484de45a["parentWithDifferentProfile()"]
  3dc59be6_081a_34fd_0727_a7b4669b8750["assertThat()"]
  c840bba8_cffb_2788_ba85_278a484de45a -->|calls| 3dc59be6_081a_34fd_0727_a7b4669b8750
  546343f2_f93a_0dc3_7a91_7016e75078f5["getParent()"]
  c840bba8_cffb_2788_ba85_278a484de45a -->|calls| 546343f2_f93a_0dc3_7a91_7016e75078f5
  f5ecfeee_2faa_bfff_05c7_ad8e17034d42["run()"]
  c840bba8_cffb_2788_ba85_278a484de45a -->|calls| f5ecfeee_2faa_bfff_05c7_ad8e17034d42
  style c840bba8_cffb_2788_ba85_278a484de45a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/builder/SpringApplicationBuilderTests.java lines 246–260

	@Test
	void parentWithDifferentProfile() {
		SpringApplicationBuilder shared = new SpringApplicationBuilder(ExampleConfig.class).profiles("node")
			.properties("transport=redis");
		SpringApplicationBuilder application = shared.child(ChildConfig.class)
			.profiles("admin")
			.web(WebApplicationType.NONE);
		shared.profiles("parent");
		this.context = application.run();
		assertThat(this.context.getEnvironment().acceptsProfiles(Profiles.of("node", "admin"))).isTrue();
		ApplicationContext parent = this.context.getParent();
		assertThat(parent).isNotNull();
		assertThat(parent.getEnvironment().acceptsProfiles(Profiles.of("node", "parent"))).isTrue();
		assertThat(parent.getEnvironment().acceptsProfiles(Profiles.of("admin"))).isFalse();
	}

Domain

Subdomains

Frequently Asked Questions

What does parentWithDifferentProfile() do?
parentWithDifferentProfile() is a function in the spring-boot codebase.
What does parentWithDifferentProfile() call?
parentWithDifferentProfile() calls 3 function(s): assertThat, getParent, run.

Analyze Your Own Codebase

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

Try Supermodel Free