Destruction

Annotations

public class Bean {

   @PreDestroy
   public void destroy() {
      // Code
   }

}

Interface

public class Bean implements DisposableBean {

   @Override
   public void destroy() throws Exception {
      // Code
   }

}

Last updated