what is the difference between AbstractApplicationContext
and ApplicationContext
?
can we call
context.registerShutdownHook()
registerShutdownHook() gracefully shutdowns bean and preform finalization like calling the destroy methods. This is the method declared in the interface ConfigurableApplicationContext which is implemented by AbstractApplicationContext,and it is not implemented by ApplicationContext.So the invokation of registerShutdownHook() only possible from the AbstractApplicationContext's object