My bean has a @PreDestroy annotated method which do some clean up. I want to destroy this bean at run time (in response to some ApplicationEvent) such that its preDestroy method is called.
Can any one please guide me?
Thanks
My bean has a @PreDestroy annotated method which do some clean up. I want to destroy this bean at run time (in response to some ApplicationEvent) such that its preDestroy method is called.
Can any one please guide me?
Thanks