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

child() — spring-boot Function Reference

Architecture documentation for the child() function in SpringApplicationBuilder.java from the spring-boot codebase.

Function java GradlePlugin DslExtensions calls 8 called by 3

Entity Profile

Dependency Diagram

graph TD
  a64bbc22_3f73_434d_d720_26462030b670["child()"]
  4f9d32e7_49fa_bf58_7fa7_48f34be930ba["sibling()"]
  4f9d32e7_49fa_bf58_7fa7_48f34be930ba -->|calls| a64bbc22_3f73_434d_d720_26462030b670
  7df18ae5_4388_cf89_197e_0eb635b31cfa["loggingPerformedDuringChildApplicationStartIsNotLost()"]
  7df18ae5_4388_cf89_197e_0eb635b31cfa -->|calls| a64bbc22_3f73_434d_d720_26462030b670
  cd290cc3_c512_348f_0aea_acc9eedcb653["onlyRegisteredOnceWhenThereIsAChildContext()"]
  cd290cc3_c512_348f_0aea_acc9eedcb653 -->|calls| a64bbc22_3f73_434d_d720_26462030b670
  67bae297_b590_f5e5_2666_5d557e3b57b1["SpringApplicationBuilder()"]
  a64bbc22_3f73_434d_d720_26462030b670 -->|calls| 67bae297_b590_f5e5_2666_5d557e3b57b1
  51fff311_cd5f_0d1a_785f_e21bb701b042["sources()"]
  a64bbc22_3f73_434d_d720_26462030b670 -->|calls| 51fff311_cd5f_0d1a_785f_e21bb701b042
  94e71749_900c_a3ee_880d_8d0e95c538e4["properties()"]
  a64bbc22_3f73_434d_d720_26462030b670 -->|calls| 94e71749_900c_a3ee_880d_8d0e95c538e4
  ae274a0a_4be3_3db9_53e9_5b0b050b3801["environment()"]
  a64bbc22_3f73_434d_d720_26462030b670 -->|calls| ae274a0a_4be3_3db9_53e9_5b0b050b3801
  dfd8607e_a468_85b7_e6fd_142525185749["additionalProfiles()"]
  a64bbc22_3f73_434d_d720_26462030b670 -->|calls| dfd8607e_a468_85b7_e6fd_142525185749
  96180309_d35f_64e9_f339_53aa62a53500["web()"]
  a64bbc22_3f73_434d_d720_26462030b670 -->|calls| 96180309_d35f_64e9_f339_53aa62a53500
  0159a89f_7984_f9c3_0890_fdee6d9790b3["bannerMode()"]
  a64bbc22_3f73_434d_d720_26462030b670 -->|calls| 0159a89f_7984_f9c3_0890_fdee6d9790b3
  3b8969f2_1870_9992_b681_07000b6fab0a["addPrimarySources()"]
  a64bbc22_3f73_434d_d720_26462030b670 -->|calls| 3b8969f2_1870_9992_b681_07000b6fab0a
  style a64bbc22_3f73_434d_d720_26462030b670 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java lines 197–219

	public SpringApplicationBuilder child(Class<?>... sources) {
		SpringApplicationBuilder child = new SpringApplicationBuilder();
		child.sources(sources);

		// Copy environment stuff from parent to child
		child.properties(this.defaultProperties)
			.environment(this.environment)
			.additionalProfiles(this.additionalProfiles);
		child.parent = this;

		// It's not possible if embedded web server are enabled to support web contexts as
		// parents because the servlets cannot be initialized at the right point in
		// lifecycle.
		web(WebApplicationType.NONE);

		// Probably not interested in multiple banners
		bannerMode(Banner.Mode.OFF);

		// Make sure sources get copied over
		this.application.addPrimarySources(this.sources);

		return child;
	}

Domain

Subdomains

Frequently Asked Questions

What does child() do?
child() is a function in the spring-boot codebase.
What does child() call?
child() calls 8 function(s): SpringApplicationBuilder, addPrimarySources, additionalProfiles, bannerMode, environment, properties, sources, web.
What calls child()?
child() is called by 3 function(s): loggingPerformedDuringChildApplicationStartIsNotLost, onlyRegisteredOnceWhenThereIsAChildContext, sibling.

Analyze Your Own Codebase

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

Try Supermodel Free