Does spring have a shutdown process to put cleanup code?

You Could use the following

  1. destroy-method as @amir75 recommends

  2. @PreDestroy annotation

  3. Implement DisposableBean and override destroy method.

All the deatails about these can be found at Disposable Callbacks.

Leave a Comment