I would like to know when ApplicationContext will call a method annotated with @PreDestroy on a bean prototype?
a) Each time the bean instance becomes unavailable (for example, ready for GC) b) When the ApplicationContext is disconnected (for example, calls close (), stop (), destroy ())
source share