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

analysisWithKnownPropertyFromSystemEnvironment() — spring-boot Function Reference

Architecture documentation for the analysisWithKnownPropertyFromSystemEnvironment() function in InvalidConfigurationPropertyValueFailureAnalyzerTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  755dba9b_3944_1df1_36d5_559bfe05c33a["analysisWithKnownPropertyFromSystemEnvironment()"]
  660de5d2_3b68_dc8d_57eb_76ad92696657["attach()"]
  755dba9b_3944_1df1_36d5_559bfe05c33a -->|calls| 660de5d2_3b68_dc8d_57eb_76ad92696657
  137a8313_50ed_1729_9ab3_b251549b7385["getProperty()"]
  755dba9b_3944_1df1_36d5_559bfe05c33a -->|calls| 137a8313_50ed_1729_9ab3_b251549b7385
  76a8f351_0101_5e91_376b_b1b7132cfbc6["InvalidConfigurationPropertyValueException()"]
  755dba9b_3944_1df1_36d5_559bfe05c33a -->|calls| 76a8f351_0101_5e91_376b_b1b7132cfbc6
  8de78192_a78d_83e4_9384_66ded02fff62["performAnalysis()"]
  755dba9b_3944_1df1_36d5_559bfe05c33a -->|calls| 8de78192_a78d_83e4_9384_66ded02fff62
  ebc7cdd4_21bc_3491_686c_090da262ca48["getDescription()"]
  755dba9b_3944_1df1_36d5_559bfe05c33a -->|calls| ebc7cdd4_21bc_3491_686c_090da262ca48
  f68a547a_0d93_764b_7125_80c78705be6b["getCause()"]
  755dba9b_3944_1df1_36d5_559bfe05c33a -->|calls| f68a547a_0d93_764b_7125_80c78705be6b
  1a4e5320_a2e2_8aa5_7d05_1e805db190f1["getAction()"]
  755dba9b_3944_1df1_36d5_559bfe05c33a -->|calls| 1a4e5320_a2e2_8aa5_7d05_1e805db190f1
  style 755dba9b_3944_1df1_36d5_559bfe05c33a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/InvalidConfigurationPropertyValueFailureAnalyzerTests.java lines 72–91

	@Test
	void analysisWithKnownPropertyFromSystemEnvironment() {
		MapPropertySource source = new SystemEnvironmentPropertySource("systemEnvironment",
				Collections.singletonMap("COM_EXAMPLE_TESTPROPERTY", "invalid"));
		this.environment.getPropertySources().addFirst(source);
		ConfigurationPropertySources.attach(this.environment);
		assertThat(this.environment.getProperty("com.example.test-property")).isEqualTo("invalid");
		InvalidConfigurationPropertyValueException failure = new InvalidConfigurationPropertyValueException(
				"com.example.test-property", "invalid", "This is not valid.");
		FailureAnalysis analysis = performAnalysis(failure);
		assertThat(analysis).isNotNull();
		assertThat(analysis.getDescription()).contains("com.example.test-property")
			.contains("invalid")
			.contains("property source \"systemEnvironment\"");
		assertThat(analysis.getCause()).isSameAs(failure);
		assertThat(analysis.getAction()).contains("Review the value of the property with the provided reason.");
		assertThat(analysis.getDescription()).contains("Validation failed for the following reason")
			.contains("This is not valid.")
			.doesNotContain("Additionally, this property is also set");
	}

Domain

Subdomains

Frequently Asked Questions

What does analysisWithKnownPropertyFromSystemEnvironment() do?
analysisWithKnownPropertyFromSystemEnvironment() is a function in the spring-boot codebase.
What does analysisWithKnownPropertyFromSystemEnvironment() call?
analysisWithKnownPropertyFromSystemEnvironment() calls 7 function(s): InvalidConfigurationPropertyValueException, attach, getAction, getCause, getDescription, getProperty, performAnalysis.

Analyze Your Own Codebase

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

Try Supermodel Free