Search in sources :

Example 6 with IntegrationFlow

use of org.springframework.integration.dsl.IntegrationFlow in project spring-integration by spring-projects.

the class IpIntegrationTests method testTcpGateways.

@Test
public void testTcpGateways() {
    TestingUtilities.waitListening(this.server1, null);
    IntegrationFlow flow = f -> f.handle(Tcp.outboundGateway(Tcp.netClient("localhost", this.server1.getPort()).serializer(TcpCodecs.crlf()).deserializer(TcpCodecs.lengthHeader1()).id("client1")).remoteTimeout(m -> 5000)).transform(Transformers.objectToString());
    IntegrationFlowRegistration theFlow = this.flowContext.registration(flow).register();
    assertThat(theFlow.getMessagingTemplate().convertSendAndReceive("foo", String.class), equalTo("FOO"));
}
Also used : DirtiesContext(org.springframework.test.annotation.DirtiesContext) QueueChannel(org.springframework.integration.channel.QueueChannel) IntegrationFlow(org.springframework.integration.dsl.IntegrationFlow) RunWith(org.junit.runner.RunWith) Autowired(org.springframework.beans.factory.annotation.Autowired) IntegrationFlowContext(org.springframework.integration.dsl.context.IntegrationFlowContext) Assert.assertThat(org.junit.Assert.assertThat) TcpReceivingChannelAdapter(org.springframework.integration.ip.tcp.TcpReceivingChannelAdapter) MulticastSendingMessageHandler(org.springframework.integration.ip.udp.MulticastSendingMessageHandler) MessageBuilder(org.springframework.integration.support.MessageBuilder) TestingUtilities(org.springframework.integration.ip.util.TestingUtilities) Qualifier(org.springframework.beans.factory.annotation.Qualifier) ApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher) IntegrationFlows(org.springframework.integration.dsl.IntegrationFlows) Message(org.springframework.messaging.Message) SpringRunner(org.springframework.test.context.junit4.SpringRunner) TcpSendingMessageHandler(org.springframework.integration.ip.tcp.TcpSendingMessageHandler) Assert.assertNotNull(org.junit.Assert.assertNotNull) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) ApplicationListener(org.springframework.context.ApplicationListener) EnableIntegration(org.springframework.integration.config.EnableIntegration) AbstractServerConnectionFactory(org.springframework.integration.ip.tcp.connection.AbstractServerConnectionFactory) MessageChannel(org.springframework.messaging.MessageChannel) IntegrationFlowRegistration(org.springframework.integration.dsl.context.IntegrationFlowContext.IntegrationFlowRegistration) Matchers.instanceOf(org.hamcrest.Matchers.instanceOf) TimeUnit(java.util.concurrent.TimeUnit) Configuration(org.springframework.context.annotation.Configuration) CountDownLatch(java.util.concurrent.CountDownLatch) UdpServerListeningEvent(org.springframework.integration.ip.udp.UdpServerListeningEvent) Matchers.equalTo(org.hamcrest.Matchers.equalTo) AbstractClientConnectionFactory(org.springframework.integration.ip.tcp.connection.AbstractClientConnectionFactory) TcpCodecs(org.springframework.integration.ip.tcp.serializer.TcpCodecs) UnicastReceivingChannelAdapter(org.springframework.integration.ip.udp.UnicastReceivingChannelAdapter) Bean(org.springframework.context.annotation.Bean) GenericMessage(org.springframework.messaging.support.GenericMessage) Assert.assertEquals(org.junit.Assert.assertEquals) Transformers(org.springframework.integration.dsl.Transformers) IntegrationFlowRegistration(org.springframework.integration.dsl.context.IntegrationFlowContext.IntegrationFlowRegistration) IntegrationFlow(org.springframework.integration.dsl.IntegrationFlow) Test(org.junit.Test)

Example 7 with IntegrationFlow

use of org.springframework.integration.dsl.IntegrationFlow in project spring-integration by spring-projects.

the class FtpTests method testFtpOutboundFlow.

@Test
public void testFtpOutboundFlow() {
    IntegrationFlow flow = f -> f.handle(Ftp.outboundAdapter(sessionFactory(), FileExistsMode.FAIL).useTemporaryFileName(false).fileNameExpression("headers['" + FileHeaders.FILENAME + "']").remoteDirectory("ftpTarget"));
    IntegrationFlowRegistration registration = this.flowContext.registration(flow).register();
    String fileName = "foo.file";
    Message<ByteArrayInputStream> message = MessageBuilder.withPayload(new ByteArrayInputStream("foo".getBytes(StandardCharsets.UTF_8))).setHeader(FileHeaders.FILENAME, fileName).build();
    registration.getInputChannel().send(message);
    RemoteFileTemplate<FTPFile> template = new RemoteFileTemplate<>(sessionFactory());
    FTPFile[] files = template.execute(session -> session.list(getTargetRemoteDirectory().getName() + "/" + fileName));
    assertEquals(1, files.length);
    assertEquals(3, files[0].getSize());
    registration.destroy();
}
Also used : DirtiesContext(org.springframework.test.annotation.DirtiesContext) IntegrationFlow(org.springframework.integration.dsl.IntegrationFlow) Autowired(org.springframework.beans.factory.annotation.Autowired) Assert.assertThat(org.junit.Assert.assertThat) Matcher(java.util.regex.Matcher) ByteArrayInputStream(java.io.ByteArrayInputStream) IntegrationMessageHeaderAccessor(org.springframework.integration.IntegrationMessageHeaderAccessor) FtpInboundFileSynchronizingMessageSource(org.springframework.integration.ftp.inbound.FtpInboundFileSynchronizingMessageSource) SpringRunner(org.springframework.test.context.junit4.SpringRunner) RemoteFileTemplate(org.springframework.integration.file.remote.RemoteFileTemplate) Matchers.isOneOf(org.hamcrest.Matchers.isOneOf) FtpStreamingMessageSource(org.springframework.integration.ftp.inbound.FtpStreamingMessageSource) EnableIntegration(org.springframework.integration.config.EnableIntegration) IntegrationFlowRegistration(org.springframework.integration.dsl.context.IntegrationFlowContext.IntegrationFlowRegistration) FtpTestSupport(org.springframework.integration.ftp.FtpTestSupport) StandardCharsets(java.nio.charset.StandardCharsets) Matchers.instanceOf(org.hamcrest.Matchers.instanceOf) Configuration(org.springframework.context.annotation.Configuration) List(java.util.List) Matchers.equalTo(org.hamcrest.Matchers.equalTo) FTPFile(org.apache.commons.net.ftp.FTPFile) Matchers.containsString(org.hamcrest.Matchers.containsString) FileCopyUtils(org.springframework.util.FileCopyUtils) QueueChannel(org.springframework.integration.channel.QueueChannel) RunWith(org.junit.runner.RunWith) FileHeaders(org.springframework.integration.file.FileHeaders) IntegrationFlowContext(org.springframework.integration.dsl.context.IntegrationFlowContext) FileExistsMode(org.springframework.integration.file.support.FileExistsMode) TestUtils(org.springframework.integration.test.util.TestUtils) MessageSource(org.springframework.integration.core.MessageSource) MessageBuilder(org.springframework.integration.support.MessageBuilder) Pollers(org.springframework.integration.dsl.Pollers) IntegrationFlows(org.springframework.integration.dsl.IntegrationFlows) Message(org.springframework.messaging.Message) FtpRemoteFileTemplate(org.springframework.integration.ftp.session.FtpRemoteFileTemplate) Assert.assertNotNull(org.junit.Assert.assertNotNull) FileOutputStream(java.io.FileOutputStream) Matchers(org.hamcrest.Matchers) AbstractRemoteFileOutboundGateway(org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway) IOException(java.io.IOException) Test(org.junit.Test) ApplicationContext(org.springframework.context.ApplicationContext) File(java.io.File) Assert.assertNull(org.junit.Assert.assertNull) FileReader(java.io.FileReader) GenericMessage(org.springframework.messaging.support.GenericMessage) Assert.assertEquals(org.junit.Assert.assertEquals) StandardIntegrationFlow(org.springframework.integration.dsl.StandardIntegrationFlow) InputStream(java.io.InputStream) RemoteFileTemplate(org.springframework.integration.file.remote.RemoteFileTemplate) FtpRemoteFileTemplate(org.springframework.integration.ftp.session.FtpRemoteFileTemplate) ByteArrayInputStream(java.io.ByteArrayInputStream) IntegrationFlowRegistration(org.springframework.integration.dsl.context.IntegrationFlowContext.IntegrationFlowRegistration) FTPFile(org.apache.commons.net.ftp.FTPFile) IntegrationFlow(org.springframework.integration.dsl.IntegrationFlow) StandardIntegrationFlow(org.springframework.integration.dsl.StandardIntegrationFlow) Matchers.containsString(org.hamcrest.Matchers.containsString) Test(org.junit.Test)

Example 8 with IntegrationFlow

use of org.springframework.integration.dsl.IntegrationFlow in project spring-integration by spring-projects.

the class FtpTests method testFtpMgetFlow.

@Test
@SuppressWarnings("unchecked")
public void testFtpMgetFlow() {
    QueueChannel out = new QueueChannel();
    IntegrationFlow flow = f -> f.handle(Ftp.outboundGateway(sessionFactory(), AbstractRemoteFileOutboundGateway.Command.MGET, "payload").options(AbstractRemoteFileOutboundGateway.Option.RECURSIVE).fileExistsMode(FileExistsMode.IGNORE).filterExpression("name matches 'subFtpSource|.*1.txt'").localDirectoryExpression("'" + getTargetLocalDirectoryName() + "' + #remoteDirectory").localFilenameExpression("#remoteFileName.replaceFirst('ftpSource', 'localTarget')")).channel(out);
    IntegrationFlowRegistration registration = this.flowContext.registration(flow).register();
    String dir = "ftpSource/";
    registration.getInputChannel().send(new GenericMessage<>(dir + "*"));
    Message<?> result = out.receive(10_000);
    assertNotNull(result);
    List<File> localFiles = (List<File>) result.getPayload();
    // should have filtered ftpSource2.txt
    assertEquals(2, localFiles.size());
    for (File file : localFiles) {
        assertThat(file.getPath().replaceAll(Matcher.quoteReplacement(File.separator), "/"), Matchers.containsString(dir));
    }
    assertThat(localFiles.get(1).getPath().replaceAll(Matcher.quoteReplacement(File.separator), "/"), Matchers.containsString(dir + "subFtpSource"));
    registration.destroy();
}
Also used : DirtiesContext(org.springframework.test.annotation.DirtiesContext) IntegrationFlow(org.springframework.integration.dsl.IntegrationFlow) Autowired(org.springframework.beans.factory.annotation.Autowired) Assert.assertThat(org.junit.Assert.assertThat) Matcher(java.util.regex.Matcher) ByteArrayInputStream(java.io.ByteArrayInputStream) IntegrationMessageHeaderAccessor(org.springframework.integration.IntegrationMessageHeaderAccessor) FtpInboundFileSynchronizingMessageSource(org.springframework.integration.ftp.inbound.FtpInboundFileSynchronizingMessageSource) SpringRunner(org.springframework.test.context.junit4.SpringRunner) RemoteFileTemplate(org.springframework.integration.file.remote.RemoteFileTemplate) Matchers.isOneOf(org.hamcrest.Matchers.isOneOf) FtpStreamingMessageSource(org.springframework.integration.ftp.inbound.FtpStreamingMessageSource) EnableIntegration(org.springframework.integration.config.EnableIntegration) IntegrationFlowRegistration(org.springframework.integration.dsl.context.IntegrationFlowContext.IntegrationFlowRegistration) FtpTestSupport(org.springframework.integration.ftp.FtpTestSupport) StandardCharsets(java.nio.charset.StandardCharsets) Matchers.instanceOf(org.hamcrest.Matchers.instanceOf) Configuration(org.springframework.context.annotation.Configuration) List(java.util.List) Matchers.equalTo(org.hamcrest.Matchers.equalTo) FTPFile(org.apache.commons.net.ftp.FTPFile) Matchers.containsString(org.hamcrest.Matchers.containsString) FileCopyUtils(org.springframework.util.FileCopyUtils) QueueChannel(org.springframework.integration.channel.QueueChannel) RunWith(org.junit.runner.RunWith) FileHeaders(org.springframework.integration.file.FileHeaders) IntegrationFlowContext(org.springframework.integration.dsl.context.IntegrationFlowContext) FileExistsMode(org.springframework.integration.file.support.FileExistsMode) TestUtils(org.springframework.integration.test.util.TestUtils) MessageSource(org.springframework.integration.core.MessageSource) MessageBuilder(org.springframework.integration.support.MessageBuilder) Pollers(org.springframework.integration.dsl.Pollers) IntegrationFlows(org.springframework.integration.dsl.IntegrationFlows) Message(org.springframework.messaging.Message) FtpRemoteFileTemplate(org.springframework.integration.ftp.session.FtpRemoteFileTemplate) Assert.assertNotNull(org.junit.Assert.assertNotNull) FileOutputStream(java.io.FileOutputStream) Matchers(org.hamcrest.Matchers) AbstractRemoteFileOutboundGateway(org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway) IOException(java.io.IOException) Test(org.junit.Test) ApplicationContext(org.springframework.context.ApplicationContext) File(java.io.File) Assert.assertNull(org.junit.Assert.assertNull) FileReader(java.io.FileReader) GenericMessage(org.springframework.messaging.support.GenericMessage) Assert.assertEquals(org.junit.Assert.assertEquals) StandardIntegrationFlow(org.springframework.integration.dsl.StandardIntegrationFlow) InputStream(java.io.InputStream) QueueChannel(org.springframework.integration.channel.QueueChannel) IntegrationFlowRegistration(org.springframework.integration.dsl.context.IntegrationFlowContext.IntegrationFlowRegistration) List(java.util.List) IntegrationFlow(org.springframework.integration.dsl.IntegrationFlow) StandardIntegrationFlow(org.springframework.integration.dsl.StandardIntegrationFlow) Matchers.containsString(org.hamcrest.Matchers.containsString) FTPFile(org.apache.commons.net.ftp.FTPFile) File(java.io.File) Test(org.junit.Test)

Example 9 with IntegrationFlow

use of org.springframework.integration.dsl.IntegrationFlow in project spring-integration by spring-projects.

the class FtpTests method testFtpInboundFlow.

@Test
public void testFtpInboundFlow() throws IOException {
    QueueChannel out = new QueueChannel();
    IntegrationFlow flow = IntegrationFlows.from(Ftp.inboundAdapter(sessionFactory()).preserveTimestamp(true).remoteDirectory("ftpSource").maxFetchSize(10).regexFilter(".*\\.txt$").localFilename(f -> f.toUpperCase() + ".a").localDirectory(getTargetLocalDirectory()), e -> e.id("ftpInboundAdapter").poller(Pollers.fixedDelay(100))).channel(out).get();
    IntegrationFlowRegistration registration = this.flowContext.registration(flow).register();
    Message<?> message = out.receive(10_000);
    assertNotNull(message);
    Object payload = message.getPayload();
    assertThat(payload, instanceOf(File.class));
    File file = (File) payload;
    assertThat(file.getName(), isOneOf(" FTPSOURCE1.TXT.a", "FTPSOURCE2.TXT.a"));
    assertThat(file.getAbsolutePath(), containsString("localTarget"));
    message = out.receive(10_000);
    assertNotNull(message);
    file = (File) message.getPayload();
    assertThat(file.getName(), isOneOf(" FTPSOURCE1.TXT.a", "FTPSOURCE2.TXT.a"));
    assertThat(file.getAbsolutePath(), containsString("localTarget"));
    assertNull(out.receive(10));
    File remoteFile = new File(this.sourceRemoteDirectory, " " + prefix() + "Source1.txt");
    FileOutputStream fos = new FileOutputStream(remoteFile);
    fos.write("New content".getBytes());
    fos.close();
    remoteFile.setLastModified(System.currentTimeMillis() - 1000 * 60 * 60 * 24);
    message = out.receive(10_000);
    assertNotNull(message);
    payload = message.getPayload();
    assertThat(payload, instanceOf(File.class));
    file = (File) payload;
    assertEquals(" FTPSOURCE1.TXT.a", file.getName());
    assertEquals("New content", FileCopyUtils.copyToString(new FileReader(file)));
    MessageSource<?> source = context.getBean(FtpInboundFileSynchronizingMessageSource.class);
    assertThat(TestUtils.getPropertyValue(source, "maxFetchSize"), equalTo(10));
    registration.destroy();
}
Also used : QueueChannel(org.springframework.integration.channel.QueueChannel) FileOutputStream(java.io.FileOutputStream) IntegrationFlowRegistration(org.springframework.integration.dsl.context.IntegrationFlowContext.IntegrationFlowRegistration) FileReader(java.io.FileReader) IntegrationFlow(org.springframework.integration.dsl.IntegrationFlow) StandardIntegrationFlow(org.springframework.integration.dsl.StandardIntegrationFlow) FTPFile(org.apache.commons.net.ftp.FTPFile) File(java.io.File) Test(org.junit.Test)

Example 10 with IntegrationFlow

use of org.springframework.integration.dsl.IntegrationFlow in project spring-integration by spring-projects.

the class ManualFlowTests method testManualFlowRegistration.

@Test
public void testManualFlowRegistration() throws InterruptedException {
    IntegrationFlow myFlow = f -> f.<String, String>transform(String::toUpperCase).channel(MessageChannels.queue()).transform("Hello, "::concat, e -> e.poller(p -> p.fixedDelay(10).maxMessagesPerPoll(1).receiveTimeout(10))).handle(new BeanFactoryHandler());
    BeanFactoryHandler additionalBean = new BeanFactoryHandler();
    IntegrationFlowRegistration flowRegistration = this.integrationFlowContext.registration(myFlow).addBean(additionalBean).register();
    BeanFactoryHandler bean = this.beanFactory.getBean(flowRegistration.getId() + BeanFactoryHandler.class.getName() + "#0", BeanFactoryHandler.class);
    assertSame(additionalBean, bean);
    assertSame(this.beanFactory, bean.beanFactory);
    MessagingTemplate messagingTemplate = flowRegistration.getMessagingTemplate();
    messagingTemplate.setReceiveTimeout(10000);
    assertEquals("Hello, FOO", messagingTemplate.convertSendAndReceive("foo", String.class));
    assertEquals("Hello, BAR", messagingTemplate.convertSendAndReceive("bar", String.class));
    try {
        messagingTemplate.receive();
        fail("UnsupportedOperationException expected");
    } catch (Exception e) {
        assertThat(e, instanceOf(UnsupportedOperationException.class));
        assertThat(e.getMessage(), containsString("The 'receive()/receiveAndConvert()' isn't supported"));
    }
    flowRegistration.destroy();
    assertFalse(this.beanFactory.containsBean(flowRegistration.getId()));
    assertFalse(this.beanFactory.containsBean(flowRegistration.getId() + ".input"));
    assertFalse(this.beanFactory.containsBean(flowRegistration.getId() + BeanFactoryHandler.class.getName() + "#0"));
    ThreadPoolTaskScheduler taskScheduler = this.beanFactory.getBean(ThreadPoolTaskScheduler.class);
    Thread.sleep(100);
    assertEquals(0, taskScheduler.getActiveCount());
    assertTrue(additionalBean.destroyed);
}
Also used : DirtiesContext(org.springframework.test.annotation.DirtiesContext) Arrays(java.util.Arrays) Date(java.util.Date) IntegrationFlow(org.springframework.integration.dsl.IntegrationFlow) Autowired(org.springframework.beans.factory.annotation.Autowired) IntegrationFlowAdapter(org.springframework.integration.dsl.IntegrationFlowAdapter) MessagingTemplate(org.springframework.integration.core.MessagingTemplate) Assert.assertThat(org.junit.Assert.assertThat) MessageProducerSupport(org.springframework.integration.endpoint.MessageProducerSupport) Assert.fail(org.junit.Assert.fail) PollableChannel(org.springframework.messaging.PollableChannel) SpringRunner(org.springframework.test.context.junit4.SpringRunner) SmartLifecycleRoleController(org.springframework.integration.support.SmartLifecycleRoleController) MessageProducerSpec(org.springframework.integration.dsl.MessageProducerSpec) EnableIntegration(org.springframework.integration.config.EnableIntegration) MessageProducer(org.springframework.integration.core.MessageProducer) MessageChannel(org.springframework.messaging.MessageChannel) IntegrationFlowRegistration(org.springframework.integration.dsl.context.IntegrationFlowContext.IntegrationFlowRegistration) AnnotationConfigApplicationContext(org.springframework.context.annotation.AnnotationConfigApplicationContext) Matchers.instanceOf(org.hamcrest.Matchers.instanceOf) Objects(java.util.Objects) Configuration(org.springframework.context.annotation.Configuration) IntegrationFlowDefinition(org.springframework.integration.dsl.IntegrationFlowDefinition) MessageHandler(org.springframework.messaging.MessageHandler) Assert.assertFalse(org.junit.Assert.assertFalse) DisposableBean(org.springframework.beans.factory.DisposableBean) Matchers.containsString(org.hamcrest.Matchers.containsString) QueueChannel(org.springframework.integration.channel.QueueChannel) MessagingException(org.springframework.messaging.MessagingException) BeanCreationNotAllowedException(org.springframework.beans.factory.BeanCreationNotAllowedException) RunWith(org.junit.runner.RunWith) AbstractReplyProducingMessageHandler(org.springframework.integration.handler.AbstractReplyProducingMessageHandler) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) IntegrationFlowContext(org.springframework.integration.dsl.context.IntegrationFlowContext) AtomicReference(java.util.concurrent.atomic.AtomicReference) Supplier(java.util.function.Supplier) MessageChannels(org.springframework.integration.dsl.MessageChannels) Scope(org.springframework.context.annotation.Scope) Assert.assertSame(org.junit.Assert.assertSame) IntegrationFlows(org.springframework.integration.dsl.IntegrationFlows) Message(org.springframework.messaging.Message) ThreadPoolTaskScheduler(org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler) Assert.assertNotNull(org.junit.Assert.assertNotNull) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) MessageDeliveryException(org.springframework.messaging.MessageDeliveryException) Flux(reactor.core.publisher.Flux) Assert.assertNull(org.junit.Assert.assertNull) BeanFactory(org.springframework.beans.factory.BeanFactory) ContextConfiguration(org.springframework.test.context.ContextConfiguration) Bean(org.springframework.context.annotation.Bean) GenericMessage(org.springframework.messaging.support.GenericMessage) ConfigurableBeanFactory(org.springframework.beans.factory.config.ConfigurableBeanFactory) Assert.assertEquals(org.junit.Assert.assertEquals) StandardIntegrationFlow(org.springframework.integration.dsl.StandardIntegrationFlow) MessagingTemplate(org.springframework.integration.core.MessagingTemplate) IntegrationFlowRegistration(org.springframework.integration.dsl.context.IntegrationFlowContext.IntegrationFlowRegistration) IntegrationFlow(org.springframework.integration.dsl.IntegrationFlow) StandardIntegrationFlow(org.springframework.integration.dsl.StandardIntegrationFlow) Matchers.containsString(org.hamcrest.Matchers.containsString) MessagingException(org.springframework.messaging.MessagingException) BeanCreationNotAllowedException(org.springframework.beans.factory.BeanCreationNotAllowedException) MessageDeliveryException(org.springframework.messaging.MessageDeliveryException) ThreadPoolTaskScheduler(org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler) Test(org.junit.Test)

Aggregations

IntegrationFlow (org.springframework.integration.dsl.IntegrationFlow)17 Test (org.junit.Test)14 QueueChannel (org.springframework.integration.channel.QueueChannel)13 StandardIntegrationFlow (org.springframework.integration.dsl.StandardIntegrationFlow)12 IntegrationFlowRegistration (org.springframework.integration.dsl.context.IntegrationFlowContext.IntegrationFlowRegistration)10 Message (org.springframework.messaging.Message)9 GenericMessage (org.springframework.messaging.support.GenericMessage)9 Matchers.instanceOf (org.hamcrest.Matchers.instanceOf)8 Assert.assertEquals (org.junit.Assert.assertEquals)8 Assert.assertNotNull (org.junit.Assert.assertNotNull)8 Assert.assertThat (org.junit.Assert.assertThat)8 RunWith (org.junit.runner.RunWith)8 Autowired (org.springframework.beans.factory.annotation.Autowired)8 Configuration (org.springframework.context.annotation.Configuration)8 EnableIntegration (org.springframework.integration.config.EnableIntegration)8 IntegrationFlows (org.springframework.integration.dsl.IntegrationFlows)8 IntegrationFlowContext (org.springframework.integration.dsl.context.IntegrationFlowContext)8 DirtiesContext (org.springframework.test.annotation.DirtiesContext)8 SpringRunner (org.springframework.test.context.junit4.SpringRunner)8 File (java.io.File)7