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

bindToMapShouldBeGreedyForScalars() — spring-boot Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  86844b78_00b9_7deb_7314_c69dd7104e82["bindToMapShouldBeGreedyForScalars()"]
  dec6e978_683d_a8e4_7ae5_e3e729d3253e["MockConfigurationPropertySource()"]
  86844b78_00b9_7deb_7314_c69dd7104e82 -->|calls| dec6e978_683d_a8e4_7ae5_e3e729d3253e
  7ed947bf_22a1_2781_a2ae_759aa1907445["add()"]
  86844b78_00b9_7deb_7314_c69dd7104e82 -->|calls| 7ed947bf_22a1_2781_a2ae_759aa1907445
  d7626b8d_946e_609d_ccf0_ffbf47d8df9a["get()"]
  86844b78_00b9_7deb_7314_c69dd7104e82 -->|calls| d7626b8d_946e_609d_ccf0_ffbf47d8df9a
  4fef258c_a2a4_d498_7bd8_31a7595265f6["put()"]
  86844b78_00b9_7deb_7314_c69dd7104e82 -->|calls| 4fef258c_a2a4_d498_7bd8_31a7595265f6
  style 86844b78_00b9_7deb_7314_c69dd7104e82 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 305–318

	@Test
	void bindToMapShouldBeGreedyForScalars() {
		MockConfigurationPropertySource source = new MockConfigurationPropertySource();
		source.put("foo.aaa.bbb.ccc", "foo-bar");
		source.put("foo.bbb.ccc.ddd", "BAR_BAZ");
		source.put("foo.ccc.ddd.eee", "bazboo");
		this.sources.add(source);
		Map<String, ExampleEnum> result = this.binder.bind("foo", Bindable.mapOf(String.class, ExampleEnum.class))
			.get();
		assertThat(result).hasSize(3);
		assertThat(result).containsEntry("aaa.bbb.ccc", ExampleEnum.FOO_BAR);
		assertThat(result).containsEntry("bbb.ccc.ddd", ExampleEnum.BAR_BAZ);
		assertThat(result).containsEntry("ccc.ddd.eee", ExampleEnum.BAZ_BOO);
	}

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free