customApplicationWithResourceLoader() — spring-boot Function Reference
Architecture documentation for the customApplicationWithResourceLoader() function in SpringApplicationBuilderTests.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD 28ce2ea1_aa63_7f72_7c4d_6c9b285e928e["customApplicationWithResourceLoader()"] be22d695_81d3_ca24_90d4_9385a402a390["getClassLoader()"] 28ce2ea1_aa63_7f72_7c4d_6c9b285e928e -->|calls| be22d695_81d3_ca24_90d4_9385a402a390 23065e9b_80db_aeac_712a_f6ec57ce931c["CustomSpringApplication()"] 28ce2ea1_aa63_7f72_7c4d_6c9b285e928e -->|calls| 23065e9b_80db_aeac_712a_f6ec57ce931c 3dc59be6_081a_34fd_0727_a7b4669b8750["assertThat()"] 28ce2ea1_aa63_7f72_7c4d_6c9b285e928e -->|calls| 3dc59be6_081a_34fd_0727_a7b4669b8750 style 28ce2ea1_aa63_7f72_7c4d_6c9b285e928e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
core/spring-boot/src/test/java/org/springframework/boot/builder/SpringApplicationBuilderTests.java lines 343–358
@Test
void customApplicationWithResourceLoader() {
ResourceLoader resourceLoader = mock(ResourceLoader.class);
given(resourceLoader.getClassLoader()).willReturn(getClass().getClassLoader());
SpringApplicationBuilder applicationBuilder = new SpringApplicationBuilder(resourceLoader,
ExampleConfig.class) {
@Override
protected SpringApplication createSpringApplication(@Nullable ResourceLoader resourceLoader,
Class<?>... sources) {
return new CustomSpringApplication(resourceLoader, sources);
}
};
SpringApplication application = applicationBuilder.build();
assertThat(application).asInstanceOf(InstanceOfAssertFactories.type(CustomSpringApplication.class))
.satisfies((customApp) -> assertThat(customApp.resourceLoader).isEqualTo(resourceLoader));
}
Domain
Subdomains
Calls
- CustomSpringApplication()
- assertThat()
- getClassLoader()
Source
Frequently Asked Questions
What does customApplicationWithResourceLoader() do?
customApplicationWithResourceLoader() is a function in the spring-boot codebase.
What does customApplicationWithResourceLoader() call?
customApplicationWithResourceLoader() calls 3 function(s): CustomSpringApplication, assertThat, getClassLoader.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free