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

bindToMapNonScalarCollectionShouldPopulateMap() — spring-boot Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  25c4c41a_1810_89c5_7640_d483560b5288["bindToMapNonScalarCollectionShouldPopulateMap()"]
  bda95e6e_681f_05a1_e8d3_1d10292f4003["getMapBindable()"]
  25c4c41a_1810_89c5_7640_d483560b5288 -->|calls| bda95e6e_681f_05a1_e8d3_1d10292f4003
  8d8ef66e_fc29_736c_c815_846df9fa8305["getType()"]
  25c4c41a_1810_89c5_7640_d483560b5288 -->|calls| 8d8ef66e_fc29_736c_c815_846df9fa8305
  dec6e978_683d_a8e4_7ae5_e3e729d3253e["MockConfigurationPropertySource()"]
  25c4c41a_1810_89c5_7640_d483560b5288 -->|calls| dec6e978_683d_a8e4_7ae5_e3e729d3253e
  7ed947bf_22a1_2781_a2ae_759aa1907445["add()"]
  25c4c41a_1810_89c5_7640_d483560b5288 -->|calls| 7ed947bf_22a1_2781_a2ae_759aa1907445
  d7626b8d_946e_609d_ccf0_ffbf47d8df9a["get()"]
  25c4c41a_1810_89c5_7640_d483560b5288 -->|calls| d7626b8d_946e_609d_ccf0_ffbf47d8df9a
  4fef258c_a2a4_d498_7bd8_31a7595265f6["put()"]
  25c4c41a_1810_89c5_7640_d483560b5288 -->|calls| 4fef258c_a2a4_d498_7bd8_31a7595265f6
  3d8c903d_f744_c594_5eaa_db928a46ef92["stream()"]
  25c4c41a_1810_89c5_7640_d483560b5288 -->|calls| 3d8c903d_f744_c594_5eaa_db928a46ef92
  style 25c4c41a_1810_89c5_7640_d483560b5288 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 363–378

	@Test
	void bindToMapNonScalarCollectionShouldPopulateMap() {
		Bindable<List<JavaBean>> valueType = Bindable.listOf(JavaBean.class);
		Bindable<Map<String, List<JavaBean>>> target = getMapBindable(String.class, valueType.getType());
		MockConfigurationPropertySource source = new MockConfigurationPropertySource();
		source.put("foo.bar[0].value", "a");
		source.put("foo.bar[1].value", "b");
		source.put("foo.bar[2].value", "c");
		this.sources.add(source);
		Map<String, List<JavaBean>> map = this.binder.bind("foo", target).get();
		List<JavaBean> bar = map.get("bar");
		assertThat(bar).isNotNull();
		List<String> values = bar.stream().map(JavaBean::getValue).toList();
		assertThat(values).containsExactly("a", "b", "c");

	}

Domain

Subdomains

Frequently Asked Questions

What does bindToMapNonScalarCollectionShouldPopulateMap() do?
bindToMapNonScalarCollectionShouldPopulateMap() is a function in the spring-boot codebase.
What does bindToMapNonScalarCollectionShouldPopulateMap() call?
bindToMapNonScalarCollectionShouldPopulateMap() calls 7 function(s): MockConfigurationPropertySource, add, get, getMapBindable, getType, put, stream.

Analyze Your Own Codebase

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

Try Supermodel Free