what is the difference between AbstractApplicationContext
and ApplicationContext
?
can we call
context.registerShutdownHook()
Same as the diff between abstract class (AbstractApplicationContext ) and an interface (ApplicationContext).
Can we call context.registerShutdownHook() using ApplicationContext?
No, because registerShutdownHook()
is part of ConfigurableApplicationContext
interface which is not extended by ApplicationContext