BAEL-80 - file copy java config

This commit is contained in:
slavisa-baeldung
2016-11-15 07:04:56 +01:00
parent 3914a5d417
commit 3c254fad0b
3 changed files with 104 additions and 10 deletions
@@ -17,11 +17,10 @@ package com.baeldung.samples;
import org.apache.log4j.Logger;
import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import java.util.Scanner;
/**
* Starts the Spring Context and will initialize the Spring Integration routes.
@@ -35,15 +34,10 @@ public final class FileCopyTest {
private static final Logger LOGGER = Logger.getLogger(FileCopyTest.class);
@Test
public void test() throws InterruptedException {
final AbstractApplicationContext context =
new ClassPathXmlApplicationContext("classpath:META-INF/spring/integration/spring-integration-file-copy-context.xml");
public void whenFileCopyConfiguration_thanFileCopiedSuccessfully() throws InterruptedException {
final AbstractApplicationContext context = new AnnotationConfigApplicationContext(FileCopyConfig.class.getCanonicalName());
context.registerShutdownHook();
Thread.sleep(5000);
}
@Test