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

exitWithExplicitCode() — spring-boot Function Reference

Architecture documentation for the exitWithExplicitCode() function in SpringApplicationTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  7d72837c_c923_3889_1c5f_5c4e2425fc9f["exitWithExplicitCode()"]
  bdff67aa_55f1_2df4_5b31_ce1bd434d17f["exit()"]
  7d72837c_c923_3889_1c5f_5c4e2425fc9f -->|calls| bdff67aa_55f1_2df4_5b31_ce1bd434d17f
  71408f98_99f4_8e9c_2276_db2290266b14["getExitCode()"]
  7d72837c_c923_3889_1c5f_5c4e2425fc9f -->|calls| 71408f98_99f4_8e9c_2276_db2290266b14
  2f52a2b0_73b0_9048_618c_5bed4f31ac43["run()"]
  7d72837c_c923_3889_1c5f_5c4e2425fc9f -->|calls| 2f52a2b0_73b0_9048_618c_5bed4f31ac43
  style 7d72837c_c923_3889_1c5f_5c4e2425fc9f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java lines 856–866

	@Test
	void exitWithExplicitCode() {
		SpringApplication application = new SpringApplication(ExampleConfig.class);
		ExitCodeListener listener = new ExitCodeListener();
		application.addListeners(listener);
		application.setWebApplicationType(WebApplicationType.NONE);
		this.context = application.run();
		assertThat(this.context).isNotNull();
		assertThat(SpringApplication.exit(this.context, (ExitCodeGenerator) () -> 2)).isEqualTo(2);
		assertThat(listener.getExitCode()).isEqualTo(2);
	}

Domain

Subdomains

Calls

Frequently Asked Questions

What does exitWithExplicitCode() do?
exitWithExplicitCode() is a function in the spring-boot codebase.
What does exitWithExplicitCode() call?
exitWithExplicitCode() calls 3 function(s): exit, getExitCode, run.

Analyze Your Own Codebase

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

Try Supermodel Free