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

runWhenProfileActivatedViaSystemEnvironmentVariableWithPrefix() — spring-boot Function Reference

Architecture documentation for the runWhenProfileActivatedViaSystemEnvironmentVariableWithPrefix() function in ConfigDataEnvironmentPostProcessorIntegrationTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  d4db57cc_14b5_f0ca_e87d_9df48c07f3ad["runWhenProfileActivatedViaSystemEnvironmentVariableWithPrefix()"]
  2b0f86f3_6ad1_9ee6_9a1e_b19431054c30["setEnvironmentPrefix()"]
  d4db57cc_14b5_f0ca_e87d_9df48c07f3ad -->|calls| 2b0f86f3_6ad1_9ee6_9a1e_b19431054c30
  bcb16b39_1cc9_8ad7_8ae2_fb817a35bf45["setEnvironment()"]
  d4db57cc_14b5_f0ca_e87d_9df48c07f3ad -->|calls| bcb16b39_1cc9_8ad7_8ae2_fb817a35bf45
  f5ecfeee_2faa_bfff_05c7_ad8e17034d42["run()"]
  d4db57cc_14b5_f0ca_e87d_9df48c07f3ad -->|calls| f5ecfeee_2faa_bfff_05c7_ad8e17034d42
  76576a77_87f7_3680_8561_2923813db3c1["of()"]
  d4db57cc_14b5_f0ca_e87d_9df48c07f3ad -->|calls| 76576a77_87f7_3680_8561_2923813db3c1
  style d4db57cc_14b5_f0ca_e87d_9df48c07f3ad fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigDataEnvironmentPostProcessorIntegrationTests.java lines 467–480

	@Test // gh-45387
	void runWhenProfileActivatedViaSystemEnvironmentVariableWithPrefix() {
		this.application.setEnvironmentPrefix("example.prefix");
		this.application.setEnvironment(new TestApplicationEnvironment() {

			@Override
			public Map<String, Object> getSystemEnvironment() {
				return Map.of("EXAMPLE_PREFIX_SPRING_PROFILES_ACTIVE", "other,dev");
			}

		});
		ConfigurableApplicationContext context = this.application.run();
		assertThat(context.getEnvironment().getActiveProfiles()).contains("dev", "other");
	}

Domain

Subdomains

Frequently Asked Questions

What does runWhenProfileActivatedViaSystemEnvironmentVariableWithPrefix() do?
runWhenProfileActivatedViaSystemEnvironmentVariableWithPrefix() is a function in the spring-boot codebase.
What does runWhenProfileActivatedViaSystemEnvironmentVariableWithPrefix() call?
runWhenProfileActivatedViaSystemEnvironmentVariableWithPrefix() calls 4 function(s): of, run, setEnvironment, setEnvironmentPrefix.

Analyze Your Own Codebase

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

Try Supermodel Free