diff --git a/src/asciidoc/core-beans.adoc b/src/asciidoc/core-beans.adoc index 50d61860d4..8bf67da655 100644 --- a/src/asciidoc/core-beans.adoc +++ b/src/asciidoc/core-beans.adoc @@ -3212,19 +3212,19 @@ singleton beans so that all resources are released. Of course, you must still co and implement these destroy callbacks correctly. To register a shutdown hook, you call the `registerShutdownHook()` method that is -declared on the `AbstractApplicationContext` class: +declared on the `ConfigurableApplicationContext` interface: [source,java,indent=0] [subs="verbatim,quotes"] ---- - import org.springframework.context.support.AbstractApplicationContext; + import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; public final class Boot { public static void main(final String[] args) throws Exception { - AbstractApplicationContext ctx = new ClassPathXmlApplicationContext( + ConfigurableApplicationContext ctx = new ClassPathXmlApplicationContext( new String []{"beans.xml"}); // add a shutdown hook for the above context...