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

loadShouldUseStringConverterBeanWhenValueIsCharSequence() — spring-boot Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  2823b4b9_03f5_60e4_fa5c_43f6067724ba["loadShouldUseStringConverterBeanWhenValueIsCharSequence()"]
  56983625_becb_2cdb_d3ed_1a0eb7c431a9["charAt()"]
  2823b4b9_03f5_60e4_fa5c_43f6067724ba -->|calls| 56983625_becb_2cdb_d3ed_1a0eb7c431a9
  7a4a5428_a780_c72f_503a_9ef35293b395["refresh()"]
  2823b4b9_03f5_60e4_fa5c_43f6067724ba -->|calls| 7a4a5428_a780_c72f_503a_9ef35293b395
  76576a77_87f7_3680_8561_2923813db3c1["of()"]
  2823b4b9_03f5_60e4_fa5c_43f6067724ba -->|calls| 76576a77_87f7_3680_8561_2923813db3c1
  79e302e1_2ba8_7480_6390_e7ccb9398ca6["getPerson()"]
  2823b4b9_03f5_60e4_fa5c_43f6067724ba -->|calls| 79e302e1_2ba8_7480_6390_e7ccb9398ca6
  feaea37f_ff7a_a085_e95c_b2e99e462002["toString()"]
  2823b4b9_03f5_60e4_fa5c_43f6067724ba -->|calls| feaea37f_ff7a_a085_e95c_b2e99e462002
  style 2823b4b9_03f5_60e4_fa5c_43f6067724ba fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

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

	@Test
	void loadShouldUseStringConverterBeanWhenValueIsCharSequence() {
		this.context.register(PersonConverterConfiguration.class, PersonProperties.class);
		PropertySource<?> testProperties = new MapPropertySource("test", Map.of("test.person", new CharSequence() {

			private final String value = "John Smith";

			@Override
			public int length() {
				return this.value.length();
			}

			@Override
			public char charAt(int index) {
				return this.value.charAt(index);
			}

			@Override
			public CharSequence subSequence(int start, int end) {
				return this.value.subSequence(start, end);
			}

			@Override
			public String toString() {
				return this.value;
			}

		}));
		this.context.getEnvironment().getPropertySources().addLast(testProperties);
		this.context.refresh();
		Person person = this.context.getBean(PersonProperties.class).getPerson();
		assertThat(person).isNotNull();
		assertThat(person.firstName).isEqualTo("John");
		assertThat(person.lastName).isEqualTo("Smith");
	}

Domain

Subdomains

Frequently Asked Questions

What does loadShouldUseStringConverterBeanWhenValueIsCharSequence() do?
loadShouldUseStringConverterBeanWhenValueIsCharSequence() is a function in the spring-boot codebase.
What does loadShouldUseStringConverterBeanWhenValueIsCharSequence() call?
loadShouldUseStringConverterBeanWhenValueIsCharSequence() calls 5 function(s): charAt, getPerson, of, refresh, toString.

Analyze Your Own Codebase

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

Try Supermodel Free