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

parentContextWithClassLoader() — spring-boot Function Reference

Architecture documentation for the parentContextWithClassLoader() function in SpringApplicationBuilderTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  0f4ca81c_9070_fd1b_248e_3ff5187b9805["parentContextWithClassLoader()"]
  be22d695_81d3_ca24_90d4_9385a402a390["getClassLoader()"]
  0f4ca81c_9070_fd1b_248e_3ff5187b9805 -->|calls| be22d695_81d3_ca24_90d4_9385a402a390
  ba1f5c53_c8c1_63e3_f8f3_f8d7b03f2150["getResourceLoader()"]
  0f4ca81c_9070_fd1b_248e_3ff5187b9805 -->|calls| ba1f5c53_c8c1_63e3_f8f3_f8d7b03f2150
  3dc59be6_081a_34fd_0727_a7b4669b8750["assertThat()"]
  0f4ca81c_9070_fd1b_248e_3ff5187b9805 -->|calls| 3dc59be6_081a_34fd_0727_a7b4669b8750
  89cfa04a_3922_680e_945d_5b4338252cc7["run()"]
  0f4ca81c_9070_fd1b_248e_3ff5187b9805 -->|calls| 89cfa04a_3922_680e_945d_5b4338252cc7
  style 0f4ca81c_9070_fd1b_248e_3ff5187b9805 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/builder/SpringApplicationBuilderTests.java lines 190–201

	@Test
	void parentContextWithClassLoader() {
		SpringApplicationBuilder application = new SpringApplicationBuilder(ChildConfig.class)
			.contextFactory(ApplicationContextFactory.ofContextClass(SpyApplicationContext.class));
		ClassLoader classLoader = new URLClassLoader(new URL[0], getClass().getClassLoader());
		application.resourceLoader(new DefaultResourceLoader(classLoader));
		application.parent(ExampleConfig.class);
		this.context = application.run();
		ResourceLoader resourceLoader = ((SpyApplicationContext) this.context).getResourceLoader();
		assertThat(resourceLoader).isNotNull();
		assertThat(resourceLoader.getClassLoader()).isEqualTo(classLoader);
	}

Domain

Subdomains

Calls

Frequently Asked Questions

What does parentContextWithClassLoader() do?
parentContextWithClassLoader() is a function in the spring-boot codebase.
What does parentContextWithClassLoader() call?
parentContextWithClassLoader() calls 4 function(s): assertThat, getClassLoader, getResourceLoader, run.

Analyze Your Own Codebase

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

Try Supermodel Free