SpringDestroybean运行时

SpringDestroybean运行时,spring,Spring,我的bean有一个@PreDestroy注释的方法,可以进行一些清理。我想在运行时销毁这个bean,以响应某些ApplicationEvent,从而调用它的preDestroy方法 谁能给我指路吗 谢谢这里有一个问题。

我的bean有一个@PreDestroy注释的方法,可以进行一些清理。我想在运行时销毁这个bean,以响应某些ApplicationEvent,从而调用它的preDestroy方法

谁能给我指路吗

谢谢

这里有一个问题。