runWhenUsingCustomResourceLoader() — spring-boot Function Reference
Architecture documentation for the runWhenUsingCustomResourceLoader() function in ConfigDataEnvironmentPostProcessorIntegrationTests.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD 15914fd7_4d4f_c161_155b_f1a506e6a3c3["runWhenUsingCustomResourceLoader()"] 2fc2a1d0_ee25_1ffc_3748_29df0e961081["setResourceLoader()"] 15914fd7_4d4f_c161_155b_f1a506e6a3c3 -->|calls| 2fc2a1d0_ee25_1ffc_3748_29df0e961081 9240b0ee_9362_3192_c277_356ab3006d19["equals()"] 15914fd7_4d4f_c161_155b_f1a506e6a3c3 -->|calls| 9240b0ee_9362_3192_c277_356ab3006d19 be22d695_81d3_ca24_90d4_9385a402a390["getClassLoader()"] 15914fd7_4d4f_c161_155b_f1a506e6a3c3 -->|calls| be22d695_81d3_ca24_90d4_9385a402a390 61bdfef1_4c77_f177_2d1a_f452f9d7a529["getProperty()"] 15914fd7_4d4f_c161_155b_f1a506e6a3c3 -->|calls| 61bdfef1_4c77_f177_2d1a_f452f9d7a529 f5ecfeee_2faa_bfff_05c7_ad8e17034d42["run()"] 15914fd7_4d4f_c161_155b_f1a506e6a3c3 -->|calls| f5ecfeee_2faa_bfff_05c7_ad8e17034d42 style 15914fd7_4d4f_c161_155b_f1a506e6a3c3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
core/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigDataEnvironmentPostProcessorIntegrationTests.java lines 102–123
@Test
void runWhenUsingCustomResourceLoader() {
this.application.setResourceLoader(new ResourceLoader() {
@Override
public Resource getResource(String location) {
if (location.equals("classpath:/custom.properties")) {
return new ByteArrayResource("the.property: fromcustom".getBytes(), location);
}
return new ClassPathResource("doesnotexist");
}
@Override
public ClassLoader getClassLoader() {
return getClass().getClassLoader();
}
});
ConfigurableApplicationContext context = this.application.run("--spring.config.name=custom");
String property = context.getEnvironment().getProperty("the.property");
assertThat(property).isEqualTo("fromcustom");
}
Domain
Subdomains
Source
Frequently Asked Questions
What does runWhenUsingCustomResourceLoader() do?
runWhenUsingCustomResourceLoader() is a function in the spring-boot codebase.
What does runWhenUsingCustomResourceLoader() call?
runWhenUsingCustomResourceLoader() calls 5 function(s): equals, getClassLoader, getProperty, run, setResourceLoader.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free