public interface SpringApplicationShutdownHandlers
shutdown hooks except that they run sequentially rather than concurrently.
Shutdown handlers are guaranteed to be called only after registered
ApplicationContext instances have been closed and are no longer active.
|Modifier and Type
|Method and Description
Add an action to the handlers that will be run when the JVM exits.
Remove a previously added an action so that it no longer runs when the JVM exits.
void add(Runnable action)
action - the action to add
void remove(Runnable action)
action - the action to remove