runWhenCustomDefaultPropertySourceLoadsWithoutReplacingCustomSource() — spring-boot Function Reference
Architecture documentation for the runWhenCustomDefaultPropertySourceLoadsWithoutReplacingCustomSource() function in ConfigDataEnvironmentPostProcessorIntegrationTests.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD 0a59b811_10aa_4f1e_c50e_0a0121e7b00e["runWhenCustomDefaultPropertySourceLoadsWithoutReplacingCustomSource()"] 61bdfef1_4c77_f177_2d1a_f452f9d7a529["getProperty()"] 0a59b811_10aa_4f1e_c50e_0a0121e7b00e -->|calls| 61bdfef1_4c77_f177_2d1a_f452f9d7a529 9240b0ee_9362_3192_c277_356ab3006d19["equals()"] 0a59b811_10aa_4f1e_c50e_0a0121e7b00e -->|calls| 9240b0ee_9362_3192_c277_356ab3006d19 bcb16b39_1cc9_8ad7_8ae2_fb817a35bf45["setEnvironment()"] 0a59b811_10aa_4f1e_c50e_0a0121e7b00e -->|calls| bcb16b39_1cc9_8ad7_8ae2_fb817a35bf45 f5ecfeee_2faa_bfff_05c7_ad8e17034d42["run()"] 0a59b811_10aa_4f1e_c50e_0a0121e7b00e -->|calls| f5ecfeee_2faa_bfff_05c7_ad8e17034d42 style 0a59b811_10aa_4f1e_c50e_0a0121e7b00e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
core/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigDataEnvironmentPostProcessorIntegrationTests.java lines 810–833
@Test
@WithResource(name = "gh17001.properties", content = "gh17001loaded=true")
void runWhenCustomDefaultPropertySourceLoadsWithoutReplacingCustomSource() {
// gh-17011
Map<String, Object> source = new HashMap<>();
source.put("mapkey", "mapvalue");
MapPropertySource propertySource = new MapPropertySource("defaultProperties", source) {
@Override
public @Nullable Object getProperty(String name) {
if ("spring.config.name".equals(name)) {
return "gh17001";
}
return super.getProperty(name);
}
};
StandardEnvironment environment = new StandardEnvironment();
environment.getPropertySources().addFirst(propertySource);
this.application.setEnvironment(environment);
ConfigurableApplicationContext context = this.application.run();
assertThat(context.getEnvironment().getProperty("mapkey")).isEqualTo("mapvalue");
assertThat(context.getEnvironment().getProperty("gh17001loaded")).isEqualTo("true");
}
Domain
Subdomains
Source
Frequently Asked Questions
What does runWhenCustomDefaultPropertySourceLoadsWithoutReplacingCustomSource() do?
runWhenCustomDefaultPropertySourceLoadsWithoutReplacingCustomSource() is a function in the spring-boot codebase.
What does runWhenCustomDefaultPropertySourceLoadsWithoutReplacingCustomSource() call?
runWhenCustomDefaultPropertySourceLoadsWithoutReplacingCustomSource() calls 4 function(s): equals, getProperty, run, setEnvironment.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free