The SpringApplicationShutdownHook creates a new Thread in org.springframework.boot.SpringApplicationShutdownHook#addRuntimeShutdownHook and registers it as a JVM shutdown hook.

While shutdown hooks work with virtual threads, I'm not sure how big (if any) the benefits are when switching this to virtual threads.

Comment From: mhalbritter

Threads only allocate their stack when start is called. new Thread() doesn't consume much memory and doesn't take a whole lot of time. Refactoring the shutdown hook thread to a virtual one doesn't bring many benefits here.