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

run() — spring-boot Function Reference

Architecture documentation for the run() function in SpringApplicationShutdownHook.java from the spring-boot codebase.

Function java GradlePlugin RunTasks calls 2 called by 2

Entity Profile

Dependency Diagram

graph TD
  b1ae0e2f_4ea5_5955_0cf0_a55c81534a4d["run()"]
  1887a167_6549_5e06_8b50_3c779772f1b5["run()"]
  1887a167_6549_5e06_8b50_3c779772f1b5 -->|calls| b1ae0e2f_4ea5_5955_0cf0_a55c81534a4d
  bc9fda54_93e9_4b2a_7239_2a0b2b770dca["run()"]
  bc9fda54_93e9_4b2a_7239_2a0b2b770dca -->|calls| b1ae0e2f_4ea5_5955_0cf0_a55c81534a4d
  3bdf53bf_62fa_f16a_e330_ca4e8af1fba8["getActions()"]
  b1ae0e2f_4ea5_5955_0cf0_a55c81534a4d -->|calls| 3bdf53bf_62fa_f16a_e330_ca4e8af1fba8
  1887a167_6549_5e06_8b50_3c779772f1b5["run()"]
  b1ae0e2f_4ea5_5955_0cf0_a55c81534a4d -->|calls| 1887a167_6549_5e06_8b50_3c779772f1b5
  style b1ae0e2f_4ea5_5955_0cf0_a55c81534a4d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/main/java/org/springframework/boot/SpringApplicationShutdownHook.java lines 104–119

	@Override
	public void run() {
		Set<ConfigurableApplicationContext> contexts;
		Set<ConfigurableApplicationContext> closedContexts;
		List<Handler> handlers;
		synchronized (SpringApplicationShutdownHook.class) {
			this.inProgress = true;
			contexts = new LinkedHashSet<>(this.contexts);
			closedContexts = new LinkedHashSet<>(this.closedContexts);
			handlers = new ArrayList<>(this.handlers.getActions());
			Collections.reverse(handlers);
		}
		contexts.forEach(this::closeAndWait);
		closedContexts.forEach(this::closeAndWait);
		handlers.forEach(Handler::run);
	}

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

What does run() do?
run() is a function in the spring-boot codebase.
What does run() call?
run() calls 2 function(s): getActions, run.
What calls run()?
run() is called by 2 function(s): run, run.

Analyze Your Own Codebase

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

Try Supermodel Free