When the spring server shutdown, destroy method or the method with @PreDestroy annotation of registered beans get called. What I want is to control the execution by writing a method before even the first destroy method is called.
Use case - I want to wait for sometime before any of the beans get destroyed. This is to make the shutdown graceful.