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

addOrMerge() — spring-boot Function Reference

Architecture documentation for the addOrMerge() function in DefaultPropertiesPropertySource.java from the spring-boot codebase.

Function java GradlePlugin AotProcessing calls 2 called by 1

Entity Profile

Dependency Diagram

graph TD
  643fc08a_e5b9_5a58_e9bd_1cfe8bc9eaa6["addOrMerge()"]
  536f59d2_fd82_d804_22b3_70a9d8ad8d3e["configurePropertySources()"]
  536f59d2_fd82_d804_22b3_70a9d8ad8d3e -->|calls| 643fc08a_e5b9_5a58_e9bd_1cfe8bc9eaa6
  d88da9f9_3586_d1a5_2e12_0d8b67ac25ad["DefaultPropertiesPropertySource()"]
  643fc08a_e5b9_5a58_e9bd_1cfe8bc9eaa6 -->|calls| d88da9f9_3586_d1a5_2e12_0d8b67ac25ad
  3992e517_f942_e869_f13b_64543eec6fe2["mergeIfPossible()"]
  643fc08a_e5b9_5a58_e9bd_1cfe8bc9eaa6 -->|calls| 3992e517_f942_e869_f13b_64543eec6fe2
  style 643fc08a_e5b9_5a58_e9bd_1cfe8bc9eaa6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/main/java/org/springframework/boot/env/DefaultPropertiesPropertySource.java lines 85–98

	public static void addOrMerge(Map<String, Object> source, MutablePropertySources sources) {
		if (!CollectionUtils.isEmpty(source)) {
			Map<String, Object> resultingSource = new HashMap<>();
			DefaultPropertiesPropertySource propertySource = new DefaultPropertiesPropertySource(resultingSource);
			if (sources.contains(NAME)) {
				mergeIfPossible(source, sources, resultingSource);
				sources.replace(NAME, propertySource);
			}
			else {
				resultingSource.putAll(source);
				sources.addLast(propertySource);
			}
		}
	}

Domain

Subdomains

Calls

Frequently Asked Questions

What does addOrMerge() do?
addOrMerge() is a function in the spring-boot codebase.
What does addOrMerge() call?
addOrMerge() calls 2 function(s): DefaultPropertiesPropertySource, mergeIfPossible.
What calls addOrMerge()?
addOrMerge() is called by 1 function(s): configurePropertySources.

Analyze Your Own Codebase

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

Try Supermodel Free