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

applyToEnvironment() — spring-boot Function Reference

Architecture documentation for the applyToEnvironment() function in ConfigDataEnvironment.java from the spring-boot codebase.

Function java GradlePlugin DslExtensions calls 4 called by 1

Entity Profile

Dependency Diagram

graph TD
  6bf1d36b_5089_07ea_774b_3c44b3f1346c["applyToEnvironment()"]
  29c97804_46ca_38e2_45f8_a0bee530b831["processAndApply()"]
  29c97804_46ca_38e2_45f8_a0bee530b831 -->|calls| 6bf1d36b_5089_07ea_774b_3c44b3f1346c
  52a7e59a_694f_fe3a_942b_8220dce213a7["checkForInvalidProperties()"]
  6bf1d36b_5089_07ea_774b_3c44b3f1346c -->|calls| 52a7e59a_694f_fe3a_942b_8220dce213a7
  d5af9888_7ee1_7cc5_13b1_7e1b78b7d7da["checkMandatoryLocations()"]
  6bf1d36b_5089_07ea_774b_3c44b3f1346c -->|calls| d5af9888_7ee1_7cc5_13b1_7e1b78b7d7da
  507ae82b_62ef_fafa_178b_893912f3fc3a["applyContributor()"]
  6bf1d36b_5089_07ea_774b_3c44b3f1346c -->|calls| 507ae82b_62ef_fafa_178b_893912f3fc3a
  19e84647_774d_f8e2_34b3_754d1d840e88["moveToEnd()"]
  6bf1d36b_5089_07ea_774b_3c44b3f1346c -->|calls| 19e84647_774d_f8e2_34b3_754d1d840e88
  style 6bf1d36b_5089_07ea_774b_3c44b3f1346c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataEnvironment.java lines 334–349

	private void applyToEnvironment(ConfigDataEnvironmentContributors contributors,
			ConfigDataActivationContext activationContext, Set<ConfigDataLocation> loadedLocations,
			Set<ConfigDataLocation> optionalLocations) {
		checkForInvalidProperties(contributors);
		checkMandatoryLocations(contributors, activationContext, loadedLocations, optionalLocations);
		MutablePropertySources propertySources = this.environment.getPropertySources();
		applyContributor(contributors, activationContext, propertySources);
		DefaultPropertiesPropertySource.moveToEnd(propertySources);
		Profiles profiles = activationContext.getProfiles();
		Assert.state(profiles != null, "'profiles' must not be null");
		this.logger.trace(LogMessage.format("Setting default profiles: %s", profiles.getDefault()));
		this.environment.setDefaultProfiles(StringUtils.toStringArray(profiles.getDefault()));
		this.logger.trace(LogMessage.format("Setting active profiles: %s", profiles.getActive()));
		this.environment.setActiveProfiles(StringUtils.toStringArray(profiles.getActive()));
		this.environmentUpdateListener.onSetProfiles(profiles);
	}

Domain

Subdomains

Calls

  • applyContributor()
  • checkForInvalidProperties()
  • checkMandatoryLocations()
  • moveToEnd()

Called By

Frequently Asked Questions

What does applyToEnvironment() do?
applyToEnvironment() is a function in the spring-boot codebase.
What does applyToEnvironment() call?
applyToEnvironment() calls 4 function(s): applyContributor, checkForInvalidProperties, checkMandatoryLocations, moveToEnd.
What calls applyToEnvironment()?
applyToEnvironment() is called by 1 function(s): processAndApply.

Analyze Your Own Codebase

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

Try Supermodel Free