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

attach() — spring-boot Function Reference

Architecture documentation for the attach() function in ConfigurationPropertySources.java from the spring-boot codebase.

Function java GradlePlugin AotProcessing calls 2 called by 7

Entity Profile

Dependency Diagram

graph TD
  660de5d2_3b68_dc8d_57eb_76ad92696657["attach()"]
  be6f5284_4891_57c6_72a4_fd3fc0c8c35a["prepareEnvironment()"]
  be6f5284_4891_57c6_72a4_fd3fc0c8c35a -->|calls| 660de5d2_3b68_dc8d_57eb_76ad92696657
  fcb08830_339d_0dd1_1e71_cc165ea20cf7["testIllegalState()"]
  fcb08830_339d_0dd1_1e71_cc165ea20cf7 -->|calls| 660de5d2_3b68_dc8d_57eb_76ad92696657
  f269f0e1_d557_7e74_d870_dfb6985b345b["testSunnyDayMandated()"]
  f269f0e1_d557_7e74_d870_dfb6985b345b -->|calls| 660de5d2_3b68_dc8d_57eb_76ad92696657
  02061150_938d_939c_4bbc_e795406d267c["init()"]
  02061150_938d_939c_4bbc_e795406d267c -->|calls| 660de5d2_3b68_dc8d_57eb_76ad92696657
  755dba9b_3944_1df1_36d5_559bfe05c33a["analysisWithKnownPropertyFromSystemEnvironment()"]
  755dba9b_3944_1df1_36d5_559bfe05c33a -->|calls| 660de5d2_3b68_dc8d_57eb_76ad92696657
  ddb4ccc2_4e15_199b_e57f_94e38e24cb66["analysisWithKnownPropertyAndOtherCandidates()"]
  ddb4ccc2_4e15_199b_e57f_94e38e24cb66 -->|calls| 660de5d2_3b68_dc8d_57eb_76ad92696657
  69ded381_05c4_d29a_a34c_d918f4aeef1b["relaxedSpringProperty()"]
  69ded381_05c4_d29a_a34c_d918f4aeef1b -->|calls| 660de5d2_3b68_dc8d_57eb_76ad92696657
  22f224d0_edc0_4c8e_e0c2_e0a524465f56["getAttached()"]
  660de5d2_3b68_dc8d_57eb_76ad92696657 -->|calls| 22f224d0_edc0_4c8e_e0c2_e0a524465f56
  c9e5abd4_c9d2_46a3_2aec_4cf7aca6a0dc["isUsingSources()"]
  660de5d2_3b68_dc8d_57eb_76ad92696657 -->|calls| c9e5abd4_c9d2_46a3_2aec_4cf7aca6a0dc
  style 660de5d2_3b68_dc8d_57eb_76ad92696657 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/main/java/org/springframework/boot/context/properties/source/ConfigurationPropertySources.java lines 89–99

	public static void attach(Environment environment) {
		Assert.isInstanceOf(ConfigurableEnvironment.class, environment);
		MutablePropertySources sources = ((ConfigurableEnvironment) environment).getPropertySources();
		PropertySource<?> attached = getAttached(sources);
		if (!isUsingSources(attached, sources)) {
			attached = new ConfigurationPropertySourcesPropertySource(ATTACHED_PROPERTY_SOURCE_NAME,
					new SpringConfigurationPropertySources(sources));
		}
		sources.remove(ATTACHED_PROPERTY_SOURCE_NAME);
		sources.addFirst(attached);
	}

Domain

Subdomains

Calls

  • getAttached()
  • isUsingSources()

Frequently Asked Questions

What does attach() do?
attach() is a function in the spring-boot codebase.
What does attach() call?
attach() calls 2 function(s): getAttached, isUsingSources.
What calls attach()?
attach() is called by 7 function(s): analysisWithKnownPropertyAndOtherCandidates, analysisWithKnownPropertyFromSystemEnvironment, init, prepareEnvironment, relaxedSpringProperty, testIllegalState, testSunnyDayMandated.

Analyze Your Own Codebase

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

Try Supermodel Free