shutdownHookRegistrationCanBeDisabled() — spring-boot Function Reference
Architecture documentation for the shutdownHookRegistrationCanBeDisabled() function in LoggingApplicationListenerTests.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD fbc32e92_043c_f918_5d64_e9f54a5c97ba["shutdownHookRegistrationCanBeDisabled()"] e4941a37_d532_8edb_200f_24a620639c51["addPropertiesToEnvironment()"] fbc32e92_043c_f918_5d64_e9f54a5c97ba -->|calls| e4941a37_d532_8edb_200f_24a620639c51 b21aabff_7677_28df_125a_1805aeda834e["multicastEvent()"] fbc32e92_043c_f918_5d64_e9f54a5c97ba -->|calls| b21aabff_7677_28df_125a_1805aeda834e be3bab95_2d77_cc83_e74d_439204d631d0["ApplicationStartingEvent()"] fbc32e92_043c_f918_5d64_e9f54a5c97ba -->|calls| be3bab95_2d77_cc83_e74d_439204d631d0 16b51c89_dde4_bfa7_4c6d_cd813dd33ba3["SpringApplication()"] fbc32e92_043c_f918_5d64_e9f54a5c97ba -->|calls| 16b51c89_dde4_bfa7_4c6d_cd813dd33ba3 2708db62_8b10_9bf2_e348_171895b093f2["initialize()"] fbc32e92_043c_f918_5d64_e9f54a5c97ba -->|calls| 2708db62_8b10_9bf2_e348_171895b093f2 a74a6404_ac0b_ef50_4554_48366dd90b97["getEnvironment()"] fbc32e92_043c_f918_5d64_e9f54a5c97ba -->|calls| a74a6404_ac0b_ef50_4554_48366dd90b97 49a45454_f203_2fd5_2d77_322abb416244["getClassLoader()"] fbc32e92_043c_f918_5d64_e9f54a5c97ba -->|calls| 49a45454_f203_2fd5_2d77_322abb416244 5442b6c9_c948_65c9_3b32_df1993add6a2["getName()"] fbc32e92_043c_f918_5d64_e9f54a5c97ba -->|calls| 5442b6c9_c948_65c9_3b32_df1993add6a2 style fbc32e92_043c_f918_5d64_e9f54a5c97ba fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
core/spring-boot/src/test/java/org/springframework/boot/context/logging/LoggingApplicationListenerTests.java lines 453–465
@Test
void shutdownHookRegistrationCanBeDisabled() {
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());
addPropertiesToEnvironment(this.context, "logging.register_shutdown_hook=false");
multicastEvent(listener, new ApplicationStartingEvent(this.bootstrapContext, new SpringApplication(), NO_ARGS));
listener.initialize(this.context.getEnvironment(), getClassLoader());
assertThat(listener.shutdownHook).isNull();
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does shutdownHookRegistrationCanBeDisabled() do?
shutdownHookRegistrationCanBeDisabled() is a function in the spring-boot codebase.
What does shutdownHookRegistrationCanBeDisabled() call?
shutdownHookRegistrationCanBeDisabled() calls 8 function(s): ApplicationStartingEvent, SpringApplication, addPropertiesToEnvironment, getClassLoader, getEnvironment, getName, initialize, multicastEvent.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free