Spring / Spring Beans
When is a spring bean destroy-method being called?
Spring bean destroy method is called when the app-context is closed by calling close
method or by calling registerShutdownHook
method.
/Getting application context ApplicationContext appContext = new ClassPathXmlApplicationContext(beansXMLConfig); //cleaning context ( (ClassPathXmlApplicationContext) appContext ).close();
More Related questions...