From 7926dea3525ace6c084a6c161af4602e54531cc1 Mon Sep 17 00:00:00 2001 From: Kazuki Shimizu Date: Sat, 9 May 2015 10:25:06 +0900 Subject: [PATCH] Modify to use the ConfigurableApplicationContext in reference document Issue: SPR-13000 --- src/asciidoc/core-beans.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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...