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

onApplicationEvent() — spring-boot Function Reference

Architecture documentation for the onApplicationEvent() function in SpringApplication.java from the spring-boot codebase.

Function java GradlePlugin RunTasks calls 2 called by 19

Entity Profile

Dependency Diagram

graph TD
  8c4757c3_25d9_25d6_91cc_5f9f3f8ef50d["onApplicationEvent()"]
  b564cced_f4c5_d5d5_9b54_9c77be901b07["onApplicationEvent()"]
  b564cced_f4c5_d5d5_9b54_9c77be901b07 -->|calls| 8c4757c3_25d9_25d6_91cc_5f9f3f8ef50d
  89d005ad_7ddf_20e1_6b28_6a7636230153["onApplicationEvent()"]
  89d005ad_7ddf_20e1_6b28_6a7636230153 -->|calls| 8c4757c3_25d9_25d6_91cc_5f9f3f8ef50d
  8e21e51f_f51c_4906_6489_3263cb058226["createPidFile()"]
  8e21e51f_f51c_4906_6489_3263cb058226 -->|calls| 8c4757c3_25d9_25d6_91cc_5f9f3f8ef50d
  8432cb30_3d37_7dc9_3c6f_9b623c145bd2["overridePidFile()"]
  8432cb30_3d37_7dc9_3c6f_9b623c145bd2 -->|calls| 8c4757c3_25d9_25d6_91cc_5f9f3f8ef50d
  a9c8c794_6cc0_13d1_db71_a1de42afd589["overridePidFileWithSpring()"]
  a9c8c794_6cc0_13d1_db71_a1de42afd589 -->|calls| 8c4757c3_25d9_25d6_91cc_5f9f3f8ef50d
  a9ed1649_15c0_2685_da8a_5c998241e679["tryEnvironmentPreparedEvent()"]
  a9ed1649_15c0_2685_da8a_5c998241e679 -->|calls| 8c4757c3_25d9_25d6_91cc_5f9f3f8ef50d
  fa9888ca_58f0_e78f_c504_97b1c1735291["tryReadyEvent()"]
  fa9888ca_58f0_e78f_c504_97b1c1735291 -->|calls| 8c4757c3_25d9_25d6_91cc_5f9f3f8ef50d
  12663191_9242_dd41_3687_f6a0987d8120["withNoEnvironment()"]
  12663191_9242_dd41_3687_f6a0987d8120 -->|calls| 8c4757c3_25d9_25d6_91cc_5f9f3f8ef50d
  f2ade1d3_9cba_5194_78bc_08fcaba74d4e["continueWhenPidFileIsReadOnly()"]
  f2ade1d3_9cba_5194_78bc_08fcaba74d4e -->|calls| 8c4757c3_25d9_25d6_91cc_5f9f3f8ef50d
  ccd3c01e_b720_413c_e7a9_b5d07fb28ae1["throwWhenPidFileIsReadOnly()"]
  ccd3c01e_b720_413c_e7a9_b5d07fb28ae1 -->|calls| 8c4757c3_25d9_25d6_91cc_5f9f3f8ef50d
  d30cbcfe_171d_63c0_38e7_2af5dbc9a3cf["throwWhenPidFileIsReadOnlyWithSpring()"]
  d30cbcfe_171d_63c0_38e7_2af5dbc9a3cf -->|calls| 8c4757c3_25d9_25d6_91cc_5f9f3f8ef50d
  fcb08830_339d_0dd1_1e71_cc165ea20cf7["testIllegalState()"]
  fcb08830_339d_0dd1_1e71_cc165ea20cf7 -->|calls| 8c4757c3_25d9_25d6_91cc_5f9f3f8ef50d
  5595517f_c144_cebd_3452_574f9f15a0eb["testSunnyDayNothingMandated()"]
  5595517f_c144_cebd_3452_574f9f15a0eb -->|calls| 8c4757c3_25d9_25d6_91cc_5f9f3f8ef50d
  f269f0e1_d557_7e74_d870_dfb6985b345b["testSunnyDayMandated()"]
  f269f0e1_d557_7e74_d870_dfb6985b345b -->|calls| 8c4757c3_25d9_25d6_91cc_5f9f3f8ef50d
  style 8c4757c3_25d9_25d6_91cc_5f9f3f8ef50d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java lines 1703–1711

		@Override
		public void onApplicationEvent(ApplicationContextEvent event) {
			if (event instanceof ContextRefreshedEvent) {
				startKeepAliveThread();
			}
			else if (event instanceof ContextClosedEvent) {
				stopKeepAliveThread();
			}
		}

Domain

Subdomains

Calls

  • startKeepAliveThread()
  • stopKeepAliveThread()

Called By

Frequently Asked Questions

What does onApplicationEvent() do?
onApplicationEvent() is a function in the spring-boot codebase.
What does onApplicationEvent() call?
onApplicationEvent() calls 2 function(s): startKeepAliveThread, stopKeepAliveThread.
What calls onApplicationEvent()?
onApplicationEvent() is called by 19 function(s): continueWhenPidFileIsReadOnly, createPidFile, onApplicationEvent, onApplicationEvent, onApplicationEvent, onApplicationEvent, onApplicationEventWhenApplicationEnvironmentPreparedEventCallsPostProcessors, onApplicationEventWhenApplicationFailedEventSwitchesLogs, and 11 more.

Analyze Your Own Codebase

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

Try Supermodel Free