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

bindToMapWhenMultipleInSameSourceCandidateShouldBindFirst() — spring-boot Function Reference

Architecture documentation for the bindToMapWhenMultipleInSameSourceCandidateShouldBindFirst() function in MapBinderTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  ab691151_408f_756d_4320_342d9837ec62["bindToMapWhenMultipleInSameSourceCandidateShouldBindFirst()"]
  6b13a440_b8c4_f4d4_0bc2_c932b8debc75["MapConfigurationPropertySource()"]
  ab691151_408f_756d_4320_342d9837ec62 -->|calls| 6b13a440_b8c4_f4d4_0bc2_c932b8debc75
  7ed947bf_22a1_2781_a2ae_759aa1907445["add()"]
  ab691151_408f_756d_4320_342d9837ec62 -->|calls| 7ed947bf_22a1_2781_a2ae_759aa1907445
  d7626b8d_946e_609d_ccf0_ffbf47d8df9a["get()"]
  ab691151_408f_756d_4320_342d9837ec62 -->|calls| d7626b8d_946e_609d_ccf0_ffbf47d8df9a
  4fef258c_a2a4_d498_7bd8_31a7595265f6["put()"]
  ab691151_408f_756d_4320_342d9837ec62 -->|calls| 4fef258c_a2a4_d498_7bd8_31a7595265f6
  style ab691151_408f_756d_4320_342d9837ec62 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/MapBinderTests.java lines 230–245

	@Test
	void bindToMapWhenMultipleInSameSourceCandidateShouldBindFirst() {
		Map<String, Object> map = new HashMap<>();
		map.put("foo.bar", "1");
		map.put("foo.b-az", "2");
		map.put("foo.ba-z", "3");
		map.put("foo.bin", "4");
		MapConfigurationPropertySource propertySource = new MapConfigurationPropertySource(map);
		this.sources.add(propertySource);
		Map<String, Integer> result = this.binder.bind("foo", STRING_INTEGER_MAP).get();
		assertThat(result).hasSize(4);
		assertThat(result).containsEntry("bar", 1);
		assertThat(result).containsEntry("b-az", 2);
		assertThat(result).containsEntry("ba-z", 3);
		assertThat(result).containsEntry("bin", 4);
	}

Domain

Subdomains

Frequently Asked Questions

What does bindToMapWhenMultipleInSameSourceCandidateShouldBindFirst() do?
bindToMapWhenMultipleInSameSourceCandidateShouldBindFirst() is a function in the spring-boot codebase.
What does bindToMapWhenMultipleInSameSourceCandidateShouldBindFirst() call?
bindToMapWhenMultipleInSameSourceCandidateShouldBindFirst() calls 4 function(s): MapConfigurationPropertySource, add, get, put.

Analyze Your Own Codebase

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

Try Supermodel Free