I have a spring application which is not calling bean destroy methods on shutdown. I\'ve seen references to this being due to instantiation in a beanRefFactory, and that thi
So many upvotes, but the second statement is totally wrong, a system.exit in java would terminate the spring before ever getting to your shutdownhook, the right way to go are these 4 ways
1 InitializingBean and DisposableBean callback interfaces 2 Other Aware interfaces for specific behavior 3 custom init() and destroy() methods in bean configuration file 4 @PostConstruct and @PreDestroy annotations
Click here!