List of usage examples for org.springframework.context.annotation AnnotationConfigApplicationContext destroy
@Deprecated public void destroy()
From source file:com.graphaware.runtime.spring.SpringIntegrationTest.java
@Test public void changeFeedShouldWorkWithSpring() { AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(Config.class); assertNotNull(context.getBean(GraphDatabaseService.class)); assertNotNull(context.getBean(UuidReader.class)); context.destroy(); }
From source file:net.ggtools.maven.DDLGeneratorMojo.java
public void execute() throws MojoExecutionException { AnnotationConfigApplicationContext applicationContext = null; try {/*ww w.j a v a 2 s .com*/ applicationContext = createApplicationContext(); final DDLGenerator generator = applicationContext.getBean(DDLGenerator.class); getLog().info("Creating schema to " + ddlFile); generator.createSchema(); } finally { if (applicationContext != null) { applicationContext.destroy(); } } }