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

whenEnvironmentContainsServerPortsPropertySourceEmbeddedWebApplicationIsDetected() — spring-boot Function Reference

Architecture documentation for the whenEnvironmentContainsServerPortsPropertySourceEmbeddedWebApplicationIsDetected() function in SpringApplicationAdminMXBeanRegistrarTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  c906105b_805c_5adf_2dec_9f17acc6a33d["whenEnvironmentContainsServerPortsPropertySourceEmbeddedWebApplicationIsDetected()"]
  dc46a3f4_e969_eab8_a9b7_b18f895a1905["createObjectName()"]
  c906105b_805c_5adf_2dec_9f17acc6a33d -->|calls| dc46a3f4_e969_eab8_a9b7_b18f895a1905
  16b51c89_dde4_bfa7_4c6d_cd813dd33ba3["SpringApplication()"]
  c906105b_805c_5adf_2dec_9f17acc6a33d -->|calls| 16b51c89_dde4_bfa7_4c6d_cd813dd33ba3
  9fc735d3_f2de_a77c_c1a1_abf218992bd6["setWebApplicationType()"]
  c906105b_805c_5adf_2dec_9f17acc6a33d -->|calls| 9fc735d3_f2de_a77c_c1a1_abf218992bd6
  9a3d5383_fadd_5b25_de2e_46cd9e30922b["addInitializers()"]
  c906105b_805c_5adf_2dec_9f17acc6a33d -->|calls| 9a3d5383_fadd_5b25_de2e_46cd9e30922b
  0c7ed92a_3cad_4c23_092e_930235fc1a81["isApplicationReady()"]
  c906105b_805c_5adf_2dec_9f17acc6a33d -->|calls| 0c7ed92a_3cad_4c23_092e_930235fc1a81
  16a24333_99cc_6980_dbc5_d872d46dbcf6["isApplicationEmbeddedWebApplication()"]
  c906105b_805c_5adf_2dec_9f17acc6a33d -->|calls| 16a24333_99cc_6980_dbc5_d872d46dbcf6
  f5ecfeee_2faa_bfff_05c7_ad8e17034d42["run()"]
  c906105b_805c_5adf_2dec_9f17acc6a33d -->|calls| f5ecfeee_2faa_bfff_05c7_ad8e17034d42
  style c906105b_805c_5adf_2dec_9f17acc6a33d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/admin/SpringApplicationAdminMXBeanRegistrarTests.java lines 120–131

	@Test
	void whenEnvironmentContainsServerPortsPropertySourceEmbeddedWebApplicationIsDetected() {
		final ObjectName objectName = createObjectName(OBJECT_NAME);
		SpringApplication application = new SpringApplication(Config.class);
		application.setWebApplicationType(WebApplicationType.NONE);
		application.addInitializers((context) -> context.getEnvironment()
			.getPropertySources()
			.addLast(new MapPropertySource("server.ports", Map.of("local.server.port", "8910"))));
		this.context = application.run("--foo.bar=blam");
		assertThat(isApplicationReady(objectName)).isTrue();
		assertThat(isApplicationEmbeddedWebApplication(objectName)).isTrue();
	}

Domain

Subdomains

Frequently Asked Questions

What does whenEnvironmentContainsServerPortsPropertySourceEmbeddedWebApplicationIsDetected() do?
whenEnvironmentContainsServerPortsPropertySourceEmbeddedWebApplicationIsDetected() is a function in the spring-boot codebase.
What does whenEnvironmentContainsServerPortsPropertySourceEmbeddedWebApplicationIsDetected() call?
whenEnvironmentContainsServerPortsPropertySourceEmbeddedWebApplicationIsDetected() calls 7 function(s): SpringApplication, addInitializers, createObjectName, isApplicationEmbeddedWebApplication, isApplicationReady, run, setWebApplicationType.

Analyze Your Own Codebase

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

Try Supermodel Free