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

loadWhenHasRelativeConfigLocationUsesFileLocation() — spring-boot Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  b5329fa0_d7f9_e089_7391_aa246a83918d["loadWhenHasRelativeConfigLocationUsesFileLocation()"]
  52ec1543_b170_4920_be7a_3986dd16a384["matchingPropertySource()"]
  b5329fa0_d7f9_e089_7391_aa246a83918d -->|calls| 52ec1543_b170_4920_be7a_3986dd16a384
  f5ecfeee_2faa_bfff_05c7_ad8e17034d42["run()"]
  b5329fa0_d7f9_e089_7391_aa246a83918d -->|calls| f5ecfeee_2faa_bfff_05c7_ad8e17034d42
  19a274bb_d9c7_a72c_7ab7_6a36d8c8fa78["of()"]
  b5329fa0_d7f9_e089_7391_aa246a83918d -->|calls| 19a274bb_d9c7_a72c_7ab7_6a36d8c8fa78
  style b5329fa0_d7f9_e089_7391_aa246a83918d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

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

	@Test
	void loadWhenHasRelativeConfigLocationUsesFileLocation() throws IOException {
		File buildOutput = new BuildOutput(getClass()).getRootLocation();
		File resources = new File(buildOutput, "resources-" + UUID.randomUUID());
		try {
			resources.mkdirs();
			File properties = new File(resources, "specificlocation.properties").getAbsoluteFile();
			Files.write(properties.toPath(),
					List.of("my.property=fromspecificlocation", "the.property=fromspecificlocation"));
			Path relative = new File("").getAbsoluteFile().toPath().relativize(properties.toPath());
			ConfigurableApplicationContext context = this.application.run("--spring.config.location=" + relative);
			assertThat(context.getEnvironment()).has(matchingPropertySource(
					"Config resource 'file [" + relative + "]' via location '" + relative + "'"));
		}
		finally {
			FileSystemUtils.deleteRecursively(resources);
		}
	}

Domain

Subdomains

Calls

Frequently Asked Questions

What does loadWhenHasRelativeConfigLocationUsesFileLocation() do?
loadWhenHasRelativeConfigLocationUsesFileLocation() is a function in the spring-boot codebase.
What does loadWhenHasRelativeConfigLocationUsesFileLocation() call?
loadWhenHasRelativeConfigLocationUsesFileLocation() calls 3 function(s): matchingPropertySource, of, run.

Analyze Your Own Codebase

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

Try Supermodel Free