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

loadWhenConfigurationPropertiesContainsMapWithPositiveAndNegativeIntegerKeys() — spring-boot Function Reference

Architecture documentation for the loadWhenConfigurationPropertiesContainsMapWithPositiveAndNegativeIntegerKeys() function in ConfigurationPropertiesTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  b16c5e1c_e216_af41_4b95_896822511cbe["loadWhenConfigurationPropertiesContainsMapWithPositiveAndNegativeIntegerKeys()"]
  d7626b8d_946e_609d_ccf0_ffbf47d8df9a["get()"]
  b16c5e1c_e216_af41_4b95_896822511cbe -->|calls| d7626b8d_946e_609d_ccf0_ffbf47d8df9a
  aeb7fb0e_dc83_53ba_dd1d_cb2c981333ac["getA()"]
  b16c5e1c_e216_af41_4b95_896822511cbe -->|calls| aeb7fb0e_dc83_53ba_dd1d_cb2c981333ac
  646e67ab_5b50_4885_96c7_1c9f9671091f["getB()"]
  b16c5e1c_e216_af41_4b95_896822511cbe -->|calls| 646e67ab_5b50_4885_96c7_1c9f9671091f
  05d207ba_cdfc_1f3b_359f_89b70a0aec4e["load()"]
  b16c5e1c_e216_af41_4b95_896822511cbe -->|calls| 05d207ba_cdfc_1f3b_359f_89b70a0aec4e
  f5b6f8e4_5ed9_1127_c9a3_ede4cf2d16da["getMap()"]
  b16c5e1c_e216_af41_4b95_896822511cbe -->|calls| f5b6f8e4_5ed9_1127_c9a3_ede4cf2d16da
  style b16c5e1c_e216_af41_4b95_896822511cbe fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesTests.java lines 936–959

	@Test
	void loadWhenConfigurationPropertiesContainsMapWithPositiveAndNegativeIntegerKeys() {
		// gh-14136
		MutablePropertySources sources = this.context.getEnvironment().getPropertySources();
		Map<String, Object> source = new HashMap<>();
		source.put("test.map.x.[-1].a", "baz");
		source.put("test.map.x.1.a", "bar");
		source.put("test.map.x.1.b", 1);
		sources.addLast(new MapPropertySource("test", source));
		load(WithIntegerMapProperties.class);
		WithIntegerMapProperties bean = this.context.getBean(WithIntegerMapProperties.class);
		Map<String, Map<Integer, Foo>> map = bean.getMap();
		assertThat(map).isNotNull();
		Map<Integer, Foo> x = map.get("x");
		assertThat(x).isNotNull();
		Foo minus1 = x.get(-1);
		assertThat(minus1).isNotNull();
		assertThat(minus1.getA()).isEqualTo("baz");
		assertThat(minus1.getB()).isZero();
		Foo one = x.get(1);
		assertThat(one).isNotNull();
		assertThat(one.getA()).isEqualTo("bar");
		assertThat(one.getB()).isOne();
	}

Domain

Subdomains

Calls

Frequently Asked Questions

What does loadWhenConfigurationPropertiesContainsMapWithPositiveAndNegativeIntegerKeys() do?
loadWhenConfigurationPropertiesContainsMapWithPositiveAndNegativeIntegerKeys() is a function in the spring-boot codebase.
What does loadWhenConfigurationPropertiesContainsMapWithPositiveAndNegativeIntegerKeys() call?
loadWhenConfigurationPropertiesContainsMapWithPositiveAndNegativeIntegerKeys() calls 5 function(s): get, getA, getB, getMap, load.

Analyze Your Own Codebase

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

Try Supermodel Free