shutdownHookIsRegisteredByDefault() — spring-boot Function Reference
Architecture documentation for the shutdownHookIsRegisteredByDefault() function in LoggingApplicationListenerTests.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD 0745f4b8_2725_4afc_f32f_07506321e8d9["shutdownHookIsRegisteredByDefault()"] b21aabff_7677_28df_125a_1805aeda834e["multicastEvent()"] 0745f4b8_2725_4afc_f32f_07506321e8d9 -->|calls| b21aabff_7677_28df_125a_1805aeda834e be3bab95_2d77_cc83_e74d_439204d631d0["ApplicationStartingEvent()"] 0745f4b8_2725_4afc_f32f_07506321e8d9 -->|calls| be3bab95_2d77_cc83_e74d_439204d631d0 16b51c89_dde4_bfa7_4c6d_cd813dd33ba3["SpringApplication()"] 0745f4b8_2725_4afc_f32f_07506321e8d9 -->|calls| 16b51c89_dde4_bfa7_4c6d_cd813dd33ba3 2708db62_8b10_9bf2_e348_171895b093f2["initialize()"] 0745f4b8_2725_4afc_f32f_07506321e8d9 -->|calls| 2708db62_8b10_9bf2_e348_171895b093f2 a74a6404_ac0b_ef50_4554_48366dd90b97["getEnvironment()"] 0745f4b8_2725_4afc_f32f_07506321e8d9 -->|calls| a74a6404_ac0b_ef50_4554_48366dd90b97 49a45454_f203_2fd5_2d77_322abb416244["getClassLoader()"] 0745f4b8_2725_4afc_f32f_07506321e8d9 -->|calls| 49a45454_f203_2fd5_2d77_322abb416244 89cfa04a_3922_680e_945d_5b4338252cc7["run()"] 0745f4b8_2725_4afc_f32f_07506321e8d9 -->|calls| 89cfa04a_3922_680e_945d_5b4338252cc7 5442b6c9_c948_65c9_3b32_df1993add6a2["getName()"] 0745f4b8_2725_4afc_f32f_07506321e8d9 -->|calls| 5442b6c9_c948_65c9_3b32_df1993add6a2 style 0745f4b8_2725_4afc_f32f_07506321e8d9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
core/spring-boot/src/test/java/org/springframework/boot/context/logging/LoggingApplicationListenerTests.java lines 436–451
@Test
void shutdownHookIsRegisteredByDefault() throws Exception {
TestLoggingApplicationListener listener = new TestLoggingApplicationListener();
Object registered = ReflectionTestUtils.getField(listener, TestLoggingApplicationListener.class,
"shutdownHookRegistered");
assertThat(registered).isNotNull();
((AtomicBoolean) registered).set(false);
System.setProperty(LoggingSystem.class.getName(), TestShutdownHandlerLoggingSystem.class.getName());
multicastEvent(listener, new ApplicationStartingEvent(this.bootstrapContext, new SpringApplication(), NO_ARGS));
listener.initialize(this.context.getEnvironment(), getClassLoader());
assertThat(listener.shutdownHook).isNotNull();
listener.shutdownHook.run();
CountDownLatch shutdownLatch = TestShutdownHandlerLoggingSystem.shutdownLatch;
assertThat(shutdownLatch).isNotNull();
assertThat(shutdownLatch.await(30, TimeUnit.SECONDS)).isTrue();
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does shutdownHookIsRegisteredByDefault() do?
shutdownHookIsRegisteredByDefault() is a function in the spring-boot codebase.
What does shutdownHookIsRegisteredByDefault() call?
shutdownHookIsRegisteredByDefault() calls 8 function(s): ApplicationStartingEvent, SpringApplication, getClassLoader, getEnvironment, getName, initialize, multicastEvent, run.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free