From cc579226d696e6c97743f9327fe4e7d19651b085 Mon Sep 17 00:00:00 2001 From: Gary Russell Date: Tue, 1 Apr 2014 17:41:35 -0400 Subject: [PATCH] INTSAMPLES-127 Polishing - PR Comments - Switch to Jackson2 - Fix oxm config Polishing INTSAMPLES-127 Update to SI 4.0.0.RC1 INTSAMPLES-127 Remove Servlet Dependency travel sample; see INT-3350. INTSAMPLES-127 Update Samples to SI 4.0.0 JIRA: https://jira.spring.io/browse/INTSAMPLES-127 Created `maint` branch for ongoing SI 3.0.x samples. --- README.md | 4 + advanced/advanced-testing-examples/pom.xml | 4 +- .../advance/testing/jms/JmsMockTests.java | 10 +-- advanced/dynamic-ftp/pom.xml | 11 ++- .../ftp/DynamicFtpChannelResolver.java | 2 +- .../ftp/DynamicFtpChannelResolverTests.java | 2 +- .../ftp/FtpOutboundChannelAdapterSample.java | 46 ++++++----- applications/cafe-scripted/pom.xml | 4 +- .../amqp/cafeDemo-amqp-config-xml.xml | 2 +- applications/cafe/pom.xml | 10 +-- applications/loan-broker/pom.xml | 2 +- applications/loanshark/pom.xml | 76 +------------------ basic/amqp/pom.xml | 2 +- basic/control-bus/pom.xml | 2 +- .../controlbus/ControlBusDemoTest.java | 16 ++-- basic/enricher/pom.xml | 2 +- basic/feed/pom.xml | 2 +- .../feed/FeedInboundChannelAdapterSample.java | 11 +-- basic/file/pom.xml | 2 +- basic/ftp/pom.xml | 2 +- .../ftp/FtpInboundChannelAdapterSample.java | 4 +- .../ftp/FtpOutboundChannelAdapterSample.java | 4 +- basic/helloworld/pom.xml | 2 +- .../samples/helloworld/HelloWorldApp.java | 6 +- basic/http/pom.xml | 4 +- basic/jdbc/pom.xml | 2 +- basic/jms/pom.xml | 4 +- .../samples/jms/ChannelAdapterDemoTest.java | 4 +- .../samples/jms/GatewayDemoTest.java | 4 +- basic/jmx/pom.xml | 2 +- basic/jpa/pom.xml | 4 +- basic/mail/pom.xml | 2 +- .../GmailInboundImapIdleAdapterTestApp.java | 6 +- .../GmailInboundPop3AdapterTestApp.java | 6 +- basic/mongodb/pom.xml | 2 +- .../outbound/MongoDbOutboundAdapterDemo.java | 4 +- basic/oddeven/pom.xml | 2 +- basic/quote/pom.xml | 2 +- basic/sftp/pom.xml | 2 +- .../sftp/SftpInboundReceiveSample.java | 2 +- .../sftp/SftpOutboundTransferSample.java | 4 +- basic/tcp-amqp/pom.xml | 2 +- basic/tcp-client-server/pom.xml | 4 +- .../TcpServerConnectionDeserializeTest.java | 9 ++- .../TcpServerCustomSerializerTest.java | 6 +- basic/testing-examples/pom.xml | 9 +-- .../src/main/resources/log4j.xml | 2 +- .../CommaDelimitedAggregatorTests.java | 4 +- .../samples/testing/chain/SpelChainTests.java | 4 +- .../testing/errorhandling/GatewayTests.java | 6 +- .../testing/filter/PetFilterTests.java | 4 +- .../samples/testing/gateway/GatewayTests.java | 2 +- .../testing/router/PetRouterTests.java | 4 +- .../splitter/CommaDelimitedSplitterTests.java | 4 +- basic/twitter/pom.xml | 2 +- .../twitter/TwitterSendUpdatesSample.java | 6 +- basic/ws-inbound-gateway/pom.xml | 4 +- basic/ws-outbound-gateway/pom.xml | 2 +- .../samples/ws/WebServiceDemoTestApp.java | 10 +-- basic/xml/pom.xml | 2 +- .../xml/BookOrderProcessingTestApp.java | 4 +- basic/xmpp/pom.xml | 2 +- .../xmpp/SendInstantMessageSample.java | 6 +- intermediate/async-gateway/pom.xml | 2 +- intermediate/dynamic-poller/pom.xml | 2 +- intermediate/errorhandling/pom.xml | 2 +- .../samples/errorhandling/ErrorUnwrapper.java | 6 +- intermediate/file-processing/pom.xml | 2 +- .../fileprocessing/FileProcessingTest.java | 2 +- intermediate/mail-attachments/pom.xml | 4 +- .../support/EmailSplitter.java | 2 +- intermediate/monitoring/pom.xml | 4 +- .../PayloadAwareTimingInterceptor.java | 6 +- .../service/impl/DefaultTwitterService.java | 4 +- intermediate/multipart-http/pom.xml | 10 +-- .../MultipartClientForHttpOutboundClient.java | 3 +- intermediate/rest-http/pom.xml | 22 ++++-- .../rest/json/JaxbJacksonObjectMapper.java | 25 +++--- .../view/ExtendedMappingJacksonJsonView.java | 13 ++-- .../rest/service/EmployeeSearchService.java | 6 +- .../applicationContext-http-int.xml | 2 +- .../samples/rest/RestHttpClientTest.java | 21 +++-- .../integration/http-outbound-config.xml | 4 +- intermediate/retry-and-more/pom.xml | 4 +- .../splitter-aggregator-reaper/pom.xml | 4 +- .../TestSplitterAggregator.java | 2 + intermediate/stored-procedures-derby/pom.xml | 2 +- intermediate/stored-procedures-ms/pom.xml | 2 +- intermediate/stored-procedures-oracle/pom.xml | 2 +- .../stored-procedures-postgresql/pom.xml | 2 +- .../tcp-client-server-multiplex/pom.xml | 4 +- intermediate/travel/pom.xml | 4 +- intermediate/tx-synch/pom.xml | 4 +- 93 files changed, 262 insertions(+), 292 deletions(-) diff --git a/README.md b/README.md index 78b57ad6..70bc6f08 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ Spring Integration Samples ========================== +# Note + +This (master) branch requires Spring Integration 4.0 or above. For samples running against earlier versions of Spring Integration, use the __maint__ branch. + # Introduction Welcome to the **Spring Integration Samples** repository which provides **50+ samples** to help you learn [Spring Integration][]. To simplify your experience, the *Spring Integration* samples are split into 4 distinct categories: diff --git a/advanced/advanced-testing-examples/pom.xml b/advanced/advanced-testing-examples/pom.xml index e1c10f54..97244faa 100644 --- a/advanced/advanced-testing-examples/pom.xml +++ b/advanced/advanced-testing-examples/pom.xml @@ -14,8 +14,8 @@ UTF-8 - 3.0.2.RELEASE - 3.2.8.RELEASE + 4.0.0.RC1 + 4.0.3.RELEASE 1.2.17 4.11 diff --git a/advanced/advanced-testing-examples/src/test/java/org/springframework/integration/samples/advance/testing/jms/JmsMockTests.java b/advanced/advanced-testing-examples/src/test/java/org/springframework/integration/samples/advance/testing/jms/JmsMockTests.java index dccfcc1c..3ebbd946 100644 --- a/advanced/advanced-testing-examples/src/test/java/org/springframework/integration/samples/advance/testing/jms/JmsMockTests.java +++ b/advanced/advanced-testing-examples/src/test/java/org/springframework/integration/samples/advance/testing/jms/JmsMockTests.java @@ -30,11 +30,11 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.integration.Message; -import org.springframework.integration.MessageChannel; -import org.springframework.integration.MessagingException; -import org.springframework.integration.core.MessageHandler; -import org.springframework.integration.core.SubscribableChannel; +import org.springframework.messaging.Message; +import org.springframework.messaging.MessageChannel; +import org.springframework.messaging.MessagingException; +import org.springframework.messaging.MessageHandler; +import org.springframework.messaging.SubscribableChannel; import org.springframework.jms.core.JmsTemplate; import org.springframework.jms.support.converter.SimpleMessageConverter; diff --git a/advanced/dynamic-ftp/pom.xml b/advanced/dynamic-ftp/pom.xml index 1d6fb932..416e4e70 100644 --- a/advanced/dynamic-ftp/pom.xml +++ b/advanced/dynamic-ftp/pom.xml @@ -7,10 +7,10 @@ jar UTF-8 - 3.0.2.RELEASE - 3.2.8.RELEASE + 4.0.0.RC1 + 4.0.3.RELEASE 1.2.17 - 4.10 + 4.11 @@ -34,6 +34,11 @@ junit ${junit.version} + + org.hamcrest + hamcrest-all + 1.3 + diff --git a/advanced/dynamic-ftp/src/main/java/org/springframework/integration/samples/ftp/DynamicFtpChannelResolver.java b/advanced/dynamic-ftp/src/main/java/org/springframework/integration/samples/ftp/DynamicFtpChannelResolver.java index 889d435e..da667255 100644 --- a/advanced/dynamic-ftp/src/main/java/org/springframework/integration/samples/ftp/DynamicFtpChannelResolver.java +++ b/advanced/dynamic-ftp/src/main/java/org/springframework/integration/samples/ftp/DynamicFtpChannelResolver.java @@ -25,7 +25,7 @@ import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.core.env.PropertiesPropertySource; import org.springframework.core.env.StandardEnvironment; -import org.springframework.integration.MessageChannel; +import org.springframework.messaging.MessageChannel; /** * Demonstrates how a dynamic Spring Integration flow snippet can be used diff --git a/advanced/dynamic-ftp/src/test/java/org/springframework/integration/samples/ftp/DynamicFtpChannelResolverTests.java b/advanced/dynamic-ftp/src/test/java/org/springframework/integration/samples/ftp/DynamicFtpChannelResolverTests.java index bb77a4b3..0e73d55c 100644 --- a/advanced/dynamic-ftp/src/test/java/org/springframework/integration/samples/ftp/DynamicFtpChannelResolverTests.java +++ b/advanced/dynamic-ftp/src/test/java/org/springframework/integration/samples/ftp/DynamicFtpChannelResolverTests.java @@ -18,7 +18,7 @@ package org.springframework.integration.samples.ftp; import static org.junit.Assert.*; import org.junit.Test; -import org.springframework.integration.MessageChannel; +import org.springframework.messaging.MessageChannel; /** * @author Gary Russell diff --git a/advanced/dynamic-ftp/src/test/java/org/springframework/integration/samples/ftp/FtpOutboundChannelAdapterSample.java b/advanced/dynamic-ftp/src/test/java/org/springframework/integration/samples/ftp/FtpOutboundChannelAdapterSample.java index a4c185bc..b4a49649 100644 --- a/advanced/dynamic-ftp/src/test/java/org/springframework/integration/samples/ftp/FtpOutboundChannelAdapterSample.java +++ b/advanced/dynamic-ftp/src/test/java/org/springframework/integration/samples/ftp/FtpOutboundChannelAdapterSample.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,19 +15,22 @@ */ package org.springframework.integration.samples.ftp; +import static org.hamcrest.Matchers.instanceOf; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; import java.io.File; import java.net.UnknownHostException; import org.junit.Test; + import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.integration.Message; -import org.springframework.integration.MessageChannel; -import org.springframework.integration.MessagingException; import org.springframework.integration.support.MessageBuilder; +import org.springframework.messaging.Message; +import org.springframework.messaging.MessageChannel; +import org.springframework.messaging.MessagingException; /** * @author Gary Russell @@ -47,25 +50,28 @@ public class FtpOutboundChannelAdapterSample { .build(); try { channel.send(message); - } catch (MessagingException e) { - assertTrue(e.getCause().getCause() instanceof UnknownHostException); - assertTrue(e.getCause().getCause().getMessage().startsWith("host.for.cust1")); + } + catch (MessagingException e) { + assertThat(e.getCause().getCause().getCause(), instanceOf(UnknownHostException.class)); + assertTrue(e.getCause().getCause().getCause().getMessage().startsWith("host.for.cust1")); } // send another so we can see in the log we don't create the ac again. try { channel.send(message); - } catch (MessagingException e) { - assertTrue(e.getCause().getCause() instanceof UnknownHostException); - assertTrue(e.getCause().getCause().getMessage().startsWith("host.for.cust1")); + } + catch (MessagingException e) { + assertThat(e.getCause().getCause().getCause(), instanceOf(UnknownHostException.class)); + assertTrue(e.getCause().getCause().getCause().getMessage().startsWith("host.for.cust1")); } // send to a different customer; again, check the log to see a new ac is built message = MessageBuilder.withPayload(file) .setHeader("customer", "cust2").build(); try { channel.send(message); - } catch (MessagingException e) { - assertTrue(e.getCause().getCause() instanceof UnknownHostException); - assertTrue(e.getCause().getCause().getMessage().startsWith("host.for.cust2")); + } + catch (MessagingException e) { + assertThat(e.getCause().getCause().getCause(), instanceOf(UnknownHostException.class)); + assertTrue(e.getCause().getCause().getCause().getMessage().startsWith("host.for.cust2")); } // send to a different customer; again, check the log to see a new ac is built @@ -74,9 +80,10 @@ public class FtpOutboundChannelAdapterSample { .setHeader("customer", "cust3").build(); try { channel.send(message); - } catch (MessagingException e) { - assertTrue(e.getCause().getCause() instanceof UnknownHostException); - assertTrue(e.getCause().getCause().getMessage().startsWith("host.for.cust3")); + } + catch (MessagingException e) { + assertThat(e.getCause().getCause().getCause(), instanceOf(UnknownHostException.class)); + assertTrue(e.getCause().getCause().getCause().getMessage().startsWith("host.for.cust3")); } //send to cust1 again, since this one has been invalidated before, we should @@ -85,9 +92,10 @@ public class FtpOutboundChannelAdapterSample { .setHeader("customer", "cust1").build(); try { channel.send(message); - } catch (MessagingException e) { - assertTrue(e.getCause().getCause() instanceof UnknownHostException); - assertEquals("host.for.cust1", e.getCause().getCause().getMessage()); + } + catch (MessagingException e) { + assertThat(e.getCause().getCause().getCause(), instanceOf(UnknownHostException.class)); + assertEquals("host.for.cust1", e.getCause().getCause().getCause().getMessage()); } ctx.close(); diff --git a/applications/cafe-scripted/pom.xml b/applications/cafe-scripted/pom.xml index c389673e..60a5c84e 100644 --- a/applications/cafe-scripted/pom.xml +++ b/applications/cafe-scripted/pom.xml @@ -8,8 +8,8 @@ Samples (Applications) - Cafe Sample (Scripted Implementation) UTF-8 - 3.0.2.RELEASE - 3.2.8.RELEASE + 4.0.0.RC1 + 4.0.3.RELEASE 1.2.17 4.10 diff --git a/applications/cafe/cafe-amqp/src/main/resources/META-INF/spring/integration/amqp/cafeDemo-amqp-config-xml.xml b/applications/cafe/cafe-amqp/src/main/resources/META-INF/spring/integration/amqp/cafeDemo-amqp-config-xml.xml index f20a517b..66ff9b2f 100644 --- a/applications/cafe/cafe-amqp/src/main/resources/META-INF/spring/integration/amqp/cafeDemo-amqp-config-xml.xml +++ b/applications/cafe/cafe-amqp/src/main/resources/META-INF/spring/integration/amqp/cafeDemo-amqp-config-xml.xml @@ -21,7 +21,7 @@ - + diff --git a/applications/cafe/pom.xml b/applications/cafe/pom.xml index db5498a9..d983753c 100644 --- a/applications/cafe/pom.xml +++ b/applications/cafe/pom.xml @@ -21,8 +21,8 @@ UTF-8 - 3.0.2.RELEASE - 3.2.8.RELEASE + 4.0.0.RC1 + 4.0.3.RELEASE 1.2.17 4.10 @@ -49,9 +49,9 @@ 1.9.2 - org.codehaus.jackson - jackson-mapper-asl - 1.9.2 + com.fasterxml.jackson.core + jackson-databind + 2.3.2 log4j diff --git a/applications/loan-broker/pom.xml b/applications/loan-broker/pom.xml index 785ee4dd..4c8cf11c 100644 --- a/applications/loan-broker/pom.xml +++ b/applications/loan-broker/pom.xml @@ -8,7 +8,7 @@ Samples (Applications) - Loan Broker UTF-8 - 3.0.2.RELEASE + 4.0.0.RC1 1.1.1 1.2.17 4.10 diff --git a/applications/loanshark/pom.xml b/applications/loanshark/pom.xml index e733867f..5bd9bbf1 100644 --- a/applications/loanshark/pom.xml +++ b/applications/loanshark/pom.xml @@ -8,9 +8,8 @@ war UTF-8 - 3.0.2.RELEASE - 3.2.8.RELEASE - 1.6.10 + 4.0.0.RC1 + 4.0.3.RELEASE 1.6.1 @@ -49,11 +48,6 @@ slf4j-log4j12 ${slf4j.version} - - org.aspectj - aspectjrt - ${aspectj.version} - javax.servlet servlet-api @@ -99,11 +93,6 @@ spring-aop ${spring.version} - - org.springframework - spring-aspects - ${spring.version} - org.springframework spring-tx @@ -345,43 +334,6 @@ 1.6 - - org.codehaus.mojo - aspectj-maven-plugin - 1.0 - - - - org.aspectj - aspectjrt - ${aspectj.version} - - - org.aspectj - aspectjtools - ${aspectj.version} - - - - - - compile - test-compile - - - - - true - - - org.springframework - spring-aspects - - - 1.6 - 1.6 - - org.apache.maven.plugins maven-resources-plugin @@ -416,30 +368,6 @@ 2.5 - - org.apache.maven.plugins - maven-eclipse-plugin - 2.7 - - true - false - 2.0 - - - org.eclipse.ajdt.core.ajbuilder - - org.springframework.aspects - - - - org.springframework.ide.eclipse.core.springbuilder - - - - org.springframework.ide.eclipse.core.springnature - - - org.apache.maven.plugins maven-idea-plugin diff --git a/basic/amqp/pom.xml b/basic/amqp/pom.xml index 1e58b99b..016239cd 100644 --- a/basic/amqp/pom.xml +++ b/basic/amqp/pom.xml @@ -16,7 +16,7 @@ UTF-8 - 3.0.2.RELEASE + 4.0.0.RC1 1.2.17 4.10 diff --git a/basic/control-bus/pom.xml b/basic/control-bus/pom.xml index dc2432cf..f12eb8a1 100644 --- a/basic/control-bus/pom.xml +++ b/basic/control-bus/pom.xml @@ -14,7 +14,7 @@ UTF-8 - 3.0.2.RELEASE + 4.0.0.RC1 1.2.17 4.10 diff --git a/basic/control-bus/src/test/java/org/springframework/integration/samples/controlbus/ControlBusDemoTest.java b/basic/control-bus/src/test/java/org/springframework/integration/samples/controlbus/ControlBusDemoTest.java index b44c515c..c1e544ce 100644 --- a/basic/control-bus/src/test/java/org/springframework/integration/samples/controlbus/ControlBusDemoTest.java +++ b/basic/control-bus/src/test/java/org/springframework/integration/samples/controlbus/ControlBusDemoTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2011 the original author or authors. + * Copyright 2002-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,23 +18,24 @@ package org.springframework.integration.samples.controlbus; import org.apache.log4j.Logger; import org.junit.Test; -import org.springframework.context.ApplicationContext; +import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.integration.MessageChannel; -import org.springframework.integration.core.PollableChannel; -import org.springframework.integration.message.GenericMessage; +import org.springframework.messaging.MessageChannel; +import org.springframework.messaging.PollableChannel; +import org.springframework.messaging.support.GenericMessage; /** * @author Oleg Zhurakousky * */ public class ControlBusDemoTest { - + private static Logger logger = Logger.getLogger(ControlBusDemoTest.class); @Test public void demoControlBus(){ - ApplicationContext ac = new ClassPathXmlApplicationContext("/META-INF/spring/integration/ControlBusDemo-context.xml"); + ConfigurableApplicationContext ac = new ClassPathXmlApplicationContext( + "/META-INF/spring/integration/ControlBusDemo-context.xml"); MessageChannel controlChannel = ac.getBean("controlChannel", MessageChannel.class); PollableChannel adapterOutputChanel = ac.getBean("adapterOutputChanel", PollableChannel.class); logger.info("Received before adapter started: " + adapterOutputChanel.receive(1000)); @@ -42,5 +43,6 @@ public class ControlBusDemoTest { logger.info("Received before adapter started: " + adapterOutputChanel.receive(1000)); controlChannel.send(new GenericMessage("@inboundAdapter.stop()")); logger.info("Received after adapter stopped: " + adapterOutputChanel.receive(1000)); + ac.close(); } } diff --git a/basic/enricher/pom.xml b/basic/enricher/pom.xml index 43943d28..357e68c7 100644 --- a/basic/enricher/pom.xml +++ b/basic/enricher/pom.xml @@ -16,7 +16,7 @@ UTF-8 - 3.0.2.RELEASE + 4.0.0.RC1 1.2.17 4.10 diff --git a/basic/feed/pom.xml b/basic/feed/pom.xml index f4577ad5..13ad91d4 100644 --- a/basic/feed/pom.xml +++ b/basic/feed/pom.xml @@ -12,7 +12,7 @@ UTF-8 - 3.0.2.RELEASE + 4.0.0.RC1 1.2.17 4.10 diff --git a/basic/feed/src/test/java/org/springframework/integration/samples/feed/FeedInboundChannelAdapterSample.java b/basic/feed/src/test/java/org/springframework/integration/samples/feed/FeedInboundChannelAdapterSample.java index 0fc024ce..65c74bbb 100644 --- a/basic/feed/src/test/java/org/springframework/integration/samples/feed/FeedInboundChannelAdapterSample.java +++ b/basic/feed/src/test/java/org/springframework/integration/samples/feed/FeedInboundChannelAdapterSample.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2010 the original author or authors. + * Copyright 2002-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,10 +17,10 @@ package org.springframework.integration.samples.feed; import org.junit.Test; -import org.springframework.context.ApplicationContext; +import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.integration.Message; -import org.springframework.integration.core.PollableChannel; +import org.springframework.messaging.Message; +import org.springframework.messaging.PollableChannel; import com.sun.syndication.feed.synd.SyndEntry; @@ -33,7 +33,7 @@ public class FeedInboundChannelAdapterSample { @SuppressWarnings("unchecked") @Test public void runDemo(){ - ApplicationContext ac = + ConfigurableApplicationContext ac = new ClassPathXmlApplicationContext("META-INF/spring/integration/FeedInboundChannelAdapterSample-context.xml"); PollableChannel feedChannel = ac.getBean("feedChannel", PollableChannel.class); for (int i = 0; i < 10; i++) { @@ -46,5 +46,6 @@ public class FeedInboundChannelAdapterSample { break; } } + ac.close(); } } diff --git a/basic/file/pom.xml b/basic/file/pom.xml index 909aa66b..5ecfc6a1 100644 --- a/basic/file/pom.xml +++ b/basic/file/pom.xml @@ -12,7 +12,7 @@ UTF-8 - 3.0.2.RELEASE + 4.0.0.RC1 1.2.17 4.10 diff --git a/basic/ftp/pom.xml b/basic/ftp/pom.xml index d9c0e2d8..5acf1df2 100644 --- a/basic/ftp/pom.xml +++ b/basic/ftp/pom.xml @@ -13,7 +13,7 @@ UTF-8 - 3.0.2.RELEASE + 4.0.0.RC1 1.2.17 4.10 diff --git a/basic/ftp/src/test/java/org/springframework/integration/samples/ftp/FtpInboundChannelAdapterSample.java b/basic/ftp/src/test/java/org/springframework/integration/samples/ftp/FtpInboundChannelAdapterSample.java index dee7ca78..4ab72281 100644 --- a/basic/ftp/src/test/java/org/springframework/integration/samples/ftp/FtpInboundChannelAdapterSample.java +++ b/basic/ftp/src/test/java/org/springframework/integration/samples/ftp/FtpInboundChannelAdapterSample.java @@ -22,8 +22,8 @@ import org.apache.log4j.Logger; import org.junit.Test; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.integration.Message; -import org.springframework.integration.core.PollableChannel; +import org.springframework.messaging.Message; +import org.springframework.messaging.PollableChannel; /** * diff --git a/basic/ftp/src/test/java/org/springframework/integration/samples/ftp/FtpOutboundChannelAdapterSample.java b/basic/ftp/src/test/java/org/springframework/integration/samples/ftp/FtpOutboundChannelAdapterSample.java index fbff4ef7..4e5d1746 100644 --- a/basic/ftp/src/test/java/org/springframework/integration/samples/ftp/FtpOutboundChannelAdapterSample.java +++ b/basic/ftp/src/test/java/org/springframework/integration/samples/ftp/FtpOutboundChannelAdapterSample.java @@ -25,8 +25,8 @@ import org.junit.After; import org.junit.Test; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.integration.Message; -import org.springframework.integration.MessageChannel; +import org.springframework.messaging.Message; +import org.springframework.messaging.MessageChannel; import org.springframework.integration.support.MessageBuilder; /** diff --git a/basic/helloworld/pom.xml b/basic/helloworld/pom.xml index 21de21f3..163b8214 100644 --- a/basic/helloworld/pom.xml +++ b/basic/helloworld/pom.xml @@ -14,7 +14,7 @@ UTF-8 - 3.0.2.RELEASE + 4.0.0.RC1 1.2.17 4.10 org.springframework.integration.samples.helloworld.HelloWorldApp diff --git a/basic/helloworld/src/main/java/org/springframework/integration/samples/helloworld/HelloWorldApp.java b/basic/helloworld/src/main/java/org/springframework/integration/samples/helloworld/HelloWorldApp.java index ce6f876c..f24b03fa 100644 --- a/basic/helloworld/src/main/java/org/springframework/integration/samples/helloworld/HelloWorldApp.java +++ b/basic/helloworld/src/main/java/org/springframework/integration/samples/helloworld/HelloWorldApp.java @@ -19,9 +19,9 @@ package org.springframework.integration.samples.helloworld; import org.apache.log4j.Logger; import org.springframework.context.support.AbstractApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.integration.MessageChannel; -import org.springframework.integration.core.PollableChannel; -import org.springframework.integration.message.GenericMessage; +import org.springframework.messaging.MessageChannel; +import org.springframework.messaging.PollableChannel; +import org.springframework.messaging.support.GenericMessage; /** * Demonstrates a basic Message Endpoint that simply prepends a greeting diff --git a/basic/http/pom.xml b/basic/http/pom.xml index 4ba31060..7b3af722 100644 --- a/basic/http/pom.xml +++ b/basic/http/pom.xml @@ -13,8 +13,8 @@ UTF-8 - 3.0.2.RELEASE - 3.2.8.RELEASE + 4.0.0.RC1 + 4.0.3.RELEASE 1.2.2 1.3.2 1.2.17 diff --git a/basic/jdbc/pom.xml b/basic/jdbc/pom.xml index 26e4affa..ff8c7eb7 100644 --- a/basic/jdbc/pom.xml +++ b/basic/jdbc/pom.xml @@ -16,7 +16,7 @@ UTF-8 - 3.0.2.RELEASE + 4.0.0.RC1 1.2.17 4.10 diff --git a/basic/jms/pom.xml b/basic/jms/pom.xml index c0e0506c..47d22c45 100644 --- a/basic/jms/pom.xml +++ b/basic/jms/pom.xml @@ -14,8 +14,8 @@ UTF-8 - 3.0.2.RELEASE - 3.2.8.RELEASE + 4.0.0.RC1 + 4.0.3.RELEASE 5.7.0 1.2.17 4.10 diff --git a/basic/jms/src/test/java/org/springframework/integration/samples/jms/ChannelAdapterDemoTest.java b/basic/jms/src/test/java/org/springframework/integration/samples/jms/ChannelAdapterDemoTest.java index 963227d8..bc552fe1 100644 --- a/basic/jms/src/test/java/org/springframework/integration/samples/jms/ChannelAdapterDemoTest.java +++ b/basic/jms/src/test/java/org/springframework/integration/samples/jms/ChannelAdapterDemoTest.java @@ -19,8 +19,8 @@ import junit.framework.Assert; import org.junit.Test; import org.springframework.context.support.GenericXmlApplicationContext; -import org.springframework.integration.Message; -import org.springframework.integration.MessageChannel; +import org.springframework.messaging.Message; +import org.springframework.messaging.MessageChannel; import org.springframework.integration.channel.QueueChannel; import org.springframework.integration.support.MessageBuilder; diff --git a/basic/jms/src/test/java/org/springframework/integration/samples/jms/GatewayDemoTest.java b/basic/jms/src/test/java/org/springframework/integration/samples/jms/GatewayDemoTest.java index 16d09259..e1435a8a 100644 --- a/basic/jms/src/test/java/org/springframework/integration/samples/jms/GatewayDemoTest.java +++ b/basic/jms/src/test/java/org/springframework/integration/samples/jms/GatewayDemoTest.java @@ -19,8 +19,8 @@ import junit.framework.Assert; import org.junit.Test; import org.springframework.context.support.GenericXmlApplicationContext; -import org.springframework.integration.Message; -import org.springframework.integration.MessageChannel; +import org.springframework.messaging.Message; +import org.springframework.messaging.MessageChannel; import org.springframework.integration.channel.QueueChannel; import org.springframework.integration.support.MessageBuilder; diff --git a/basic/jmx/pom.xml b/basic/jmx/pom.xml index 96bb222f..9dd39201 100644 --- a/basic/jmx/pom.xml +++ b/basic/jmx/pom.xml @@ -14,7 +14,7 @@ UTF-8 - 3.0.2.RELEASE + 4.0.0.RC1 1.2.17 4.10 diff --git a/basic/jpa/pom.xml b/basic/jpa/pom.xml index 644a19ef..5f023ef8 100644 --- a/basic/jpa/pom.xml +++ b/basic/jpa/pom.xml @@ -16,8 +16,8 @@ UTF-8 - 3.0.2.RELEASE - 3.2.8.RELEASE + 4.0.0.RC1 + 4.0.3.RELEASE 1.2.17 4.10 2.2.0 diff --git a/basic/mail/pom.xml b/basic/mail/pom.xml index 5340ad95..f568bcd7 100644 --- a/basic/mail/pom.xml +++ b/basic/mail/pom.xml @@ -12,7 +12,7 @@ UTF-8 - 3.0.2.RELEASE + 4.0.0.RC1 1.2.17 4.10 diff --git a/basic/mail/src/main/java/org/springframework/integration/samples/mail/imapidle/GmailInboundImapIdleAdapterTestApp.java b/basic/mail/src/main/java/org/springframework/integration/samples/mail/imapidle/GmailInboundImapIdleAdapterTestApp.java index 9a02b3e8..f800021c 100644 --- a/basic/mail/src/main/java/org/springframework/integration/samples/mail/imapidle/GmailInboundImapIdleAdapterTestApp.java +++ b/basic/mail/src/main/java/org/springframework/integration/samples/mail/imapidle/GmailInboundImapIdleAdapterTestApp.java @@ -18,10 +18,10 @@ package org.springframework.integration.samples.mail.imapidle; import org.apache.log4j.Logger; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.integration.Message; -import org.springframework.integration.MessagingException; +import org.springframework.messaging.Message; +import org.springframework.messaging.MessagingException; import org.springframework.integration.channel.DirectChannel; -import org.springframework.integration.core.MessageHandler; +import org.springframework.messaging.MessageHandler; /** * @author Oleg Zhurakousky diff --git a/basic/mail/src/main/java/org/springframework/integration/samples/mail/imapidle/GmailInboundPop3AdapterTestApp.java b/basic/mail/src/main/java/org/springframework/integration/samples/mail/imapidle/GmailInboundPop3AdapterTestApp.java index 3111e1a4..2047a2f8 100644 --- a/basic/mail/src/main/java/org/springframework/integration/samples/mail/imapidle/GmailInboundPop3AdapterTestApp.java +++ b/basic/mail/src/main/java/org/springframework/integration/samples/mail/imapidle/GmailInboundPop3AdapterTestApp.java @@ -18,10 +18,10 @@ package org.springframework.integration.samples.mail.imapidle; import org.apache.log4j.Logger; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.integration.Message; -import org.springframework.integration.MessagingException; +import org.springframework.messaging.Message; +import org.springframework.messaging.MessagingException; import org.springframework.integration.channel.DirectChannel; -import org.springframework.integration.core.MessageHandler; +import org.springframework.messaging.MessageHandler; /** * @author Oleg Zhurakousky diff --git a/basic/mongodb/pom.xml b/basic/mongodb/pom.xml index 659e71d0..4ad89d77 100644 --- a/basic/mongodb/pom.xml +++ b/basic/mongodb/pom.xml @@ -16,7 +16,7 @@ UTF-8 - 3.0.2.RELEASE + 4.0.0.RC1 1.2.17 4.10 diff --git a/basic/mongodb/src/main/java/org/springframework/integration/samples/mongodb/outbound/MongoDbOutboundAdapterDemo.java b/basic/mongodb/src/main/java/org/springframework/integration/samples/mongodb/outbound/MongoDbOutboundAdapterDemo.java index 978e9f3d..1f1c13ed 100644 --- a/basic/mongodb/src/main/java/org/springframework/integration/samples/mongodb/outbound/MongoDbOutboundAdapterDemo.java +++ b/basic/mongodb/src/main/java/org/springframework/integration/samples/mongodb/outbound/MongoDbOutboundAdapterDemo.java @@ -16,8 +16,8 @@ package org.springframework.integration.samples.mongodb.outbound; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.integration.MessageChannel; -import org.springframework.integration.message.GenericMessage; +import org.springframework.messaging.MessageChannel; +import org.springframework.messaging.support.GenericMessage; import org.springframework.integration.samples.mongodb.domain.Address; import org.springframework.integration.samples.mongodb.domain.Person; import org.springframework.integration.samples.mongodb.util.DemoUtils; diff --git a/basic/oddeven/pom.xml b/basic/oddeven/pom.xml index 81bd0035..260185a3 100644 --- a/basic/oddeven/pom.xml +++ b/basic/oddeven/pom.xml @@ -14,7 +14,7 @@ UTF-8 - 3.0.2.RELEASE + 4.0.0.RC1 1.2.17 4.10 diff --git a/basic/quote/pom.xml b/basic/quote/pom.xml index 1480c32f..48d2361c 100644 --- a/basic/quote/pom.xml +++ b/basic/quote/pom.xml @@ -12,7 +12,7 @@ UTF-8 - 3.0.2.RELEASE + 4.0.0.RC1 1.2.17 4.10 diff --git a/basic/sftp/pom.xml b/basic/sftp/pom.xml index 35594932..1d2b384f 100644 --- a/basic/sftp/pom.xml +++ b/basic/sftp/pom.xml @@ -11,7 +11,7 @@ UTF-8 - 3.0.2.RELEASE + 4.0.0.RC1 1.2.17 4.10 diff --git a/basic/sftp/src/test/java/org/springframework/integration/samples/sftp/SftpInboundReceiveSample.java b/basic/sftp/src/test/java/org/springframework/integration/samples/sftp/SftpInboundReceiveSample.java index 4a99126f..77900a4f 100644 --- a/basic/sftp/src/test/java/org/springframework/integration/samples/sftp/SftpInboundReceiveSample.java +++ b/basic/sftp/src/test/java/org/springframework/integration/samples/sftp/SftpInboundReceiveSample.java @@ -19,7 +19,7 @@ import org.junit.Test; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.integration.core.PollableChannel; +import org.springframework.messaging.PollableChannel; /** * @author Oleg Zhurakousky diff --git a/basic/sftp/src/test/java/org/springframework/integration/samples/sftp/SftpOutboundTransferSample.java b/basic/sftp/src/test/java/org/springframework/integration/samples/sftp/SftpOutboundTransferSample.java index 4633b9f8..28e0e7db 100644 --- a/basic/sftp/src/test/java/org/springframework/integration/samples/sftp/SftpOutboundTransferSample.java +++ b/basic/sftp/src/test/java/org/springframework/integration/samples/sftp/SftpOutboundTransferSample.java @@ -20,8 +20,8 @@ import java.io.File; import org.junit.Test; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.integration.Message; -import org.springframework.integration.MessageChannel; +import org.springframework.messaging.Message; +import org.springframework.messaging.MessageChannel; import org.springframework.integration.support.MessageBuilder; import org.springframework.util.Assert; diff --git a/basic/tcp-amqp/pom.xml b/basic/tcp-amqp/pom.xml index c2c25e2d..f686763d 100644 --- a/basic/tcp-amqp/pom.xml +++ b/basic/tcp-amqp/pom.xml @@ -16,7 +16,7 @@ UTF-8 - 3.0.2.RELEASE + 4.0.0.RC1 1.6.4 4.10 diff --git a/basic/tcp-client-server/pom.xml b/basic/tcp-client-server/pom.xml index e489d3ca..139df996 100644 --- a/basic/tcp-client-server/pom.xml +++ b/basic/tcp-client-server/pom.xml @@ -12,8 +12,8 @@ UTF-8 - 3.2.8.RELEASE - 3.0.2.RELEASE + 4.0.3.RELEASE + 4.0.0.RC1 1.2.17 4.10 org.springframework.integration.samples.tcpclientserver.Main diff --git a/basic/tcp-client-server/src/test/java/org/springframework/integration/samples/tcpclientserver/TcpServerConnectionDeserializeTest.java b/basic/tcp-client-server/src/test/java/org/springframework/integration/samples/tcpclientserver/TcpServerConnectionDeserializeTest.java index a80c2c48..0d5d5924 100644 --- a/basic/tcp-client-server/src/test/java/org/springframework/integration/samples/tcpclientserver/TcpServerConnectionDeserializeTest.java +++ b/basic/tcp-client-server/src/test/java/org/springframework/integration/samples/tcpclientserver/TcpServerConnectionDeserializeTest.java @@ -22,16 +22,17 @@ import java.io.StringWriter; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.integration.Message; -import org.springframework.integration.MessageChannel; -import org.springframework.integration.core.SubscribableChannel; +import org.springframework.messaging.SubscribableChannel; import org.springframework.integration.handler.AbstractReplyProducingMessageHandler; import org.springframework.integration.ip.tcp.connection.AbstractServerConnectionFactory; import org.springframework.integration.ip.tcp.serializer.ByteArrayStxEtxSerializer; import org.springframework.integration.ip.util.TestingUtilities; import org.springframework.integration.samples.tcpclientserver.support.CustomTestContextLoader; +import org.springframework.messaging.Message; +import org.springframework.messaging.MessageChannel; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @@ -75,7 +76,7 @@ public class TcpServerConnectionDeserializeTest { // the reason we use a listener here is so we can assert truths on the // message and/or payload SubscribableChannel channel = (SubscribableChannel) incomingServerChannel; - channel.subscribe(new AbstractReplyProducingMessageHandler(){ + channel.subscribe(new AbstractReplyProducingMessageHandler() { @Override protected Object handleRequestMessage(Message requestMessage) { diff --git a/basic/tcp-client-server/src/test/java/org/springframework/integration/samples/tcpclientserver/TcpServerCustomSerializerTest.java b/basic/tcp-client-server/src/test/java/org/springframework/integration/samples/tcpclientserver/TcpServerCustomSerializerTest.java index 234e8d6a..b93039d9 100644 --- a/basic/tcp-client-server/src/test/java/org/springframework/integration/samples/tcpclientserver/TcpServerCustomSerializerTest.java +++ b/basic/tcp-client-server/src/test/java/org/springframework/integration/samples/tcpclientserver/TcpServerCustomSerializerTest.java @@ -33,9 +33,9 @@ import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; -import org.springframework.integration.Message; -import org.springframework.integration.MessageChannel; -import org.springframework.integration.core.SubscribableChannel; +import org.springframework.messaging.Message; +import org.springframework.messaging.MessageChannel; +import org.springframework.messaging.SubscribableChannel; import org.springframework.integration.handler.AbstractReplyProducingMessageHandler; import org.springframework.integration.ip.tcp.connection.AbstractServerConnectionFactory; import org.springframework.integration.ip.util.TestingUtilities; diff --git a/basic/testing-examples/pom.xml b/basic/testing-examples/pom.xml index d0f2c499..c8fb1f8a 100644 --- a/basic/testing-examples/pom.xml +++ b/basic/testing-examples/pom.xml @@ -12,8 +12,8 @@ UTF-8 - 3.0.2.RELEASE - 3.2.8.RELEASE + 4.0.0.RC1 + 4.0.3.RELEASE 1.2.17 4.10 @@ -38,11 +38,6 @@ - - org.springframework.integration - spring-integration-http - ${spring.integration.version} - org.springframework.integration spring-integration-test diff --git a/basic/testing-examples/src/main/resources/log4j.xml b/basic/testing-examples/src/main/resources/log4j.xml index 0368cdf8..5ce38316 100644 --- a/basic/testing-examples/src/main/resources/log4j.xml +++ b/basic/testing-examples/src/main/resources/log4j.xml @@ -12,7 +12,7 @@ - + diff --git a/basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/aggregator/CommaDelimitedAggregatorTests.java b/basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/aggregator/CommaDelimitedAggregatorTests.java index 1d321abd..9827c829 100644 --- a/basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/aggregator/CommaDelimitedAggregatorTests.java +++ b/basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/aggregator/CommaDelimitedAggregatorTests.java @@ -26,8 +26,8 @@ import java.util.List; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.integration.Message; -import org.springframework.integration.MessageChannel; +import org.springframework.messaging.Message; +import org.springframework.messaging.MessageChannel; import org.springframework.integration.channel.QueueChannel; import org.springframework.integration.samples.testing.splitter.CommaDelimitedSplitter; import org.springframework.integration.support.MessageBuilder; diff --git a/basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/chain/SpelChainTests.java b/basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/chain/SpelChainTests.java index 6c7766f7..813a852b 100644 --- a/basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/chain/SpelChainTests.java +++ b/basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/chain/SpelChainTests.java @@ -21,8 +21,8 @@ import static org.junit.Assert.assertNotNull; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.integration.Message; -import org.springframework.integration.MessageChannel; +import org.springframework.messaging.Message; +import org.springframework.messaging.MessageChannel; import org.springframework.integration.channel.QueueChannel; import org.springframework.integration.support.MessageBuilder; import org.springframework.test.context.ContextConfiguration; diff --git a/basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/errorhandling/GatewayTests.java b/basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/errorhandling/GatewayTests.java index 2a4fb081..fe8ceedc 100644 --- a/basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/errorhandling/GatewayTests.java +++ b/basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/errorhandling/GatewayTests.java @@ -22,9 +22,9 @@ import static org.junit.Assert.assertTrue; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.integration.Message; -import org.springframework.integration.MessageHandlingException; -import org.springframework.integration.MessagingException; +import org.springframework.messaging.Message; +import org.springframework.messaging.MessageHandlingException; +import org.springframework.messaging.MessagingException; import org.springframework.integration.channel.QueueChannel; import org.springframework.integration.samples.testing.gateway.VoidGateway; import org.springframework.test.context.ContextConfiguration; diff --git a/basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/filter/PetFilterTests.java b/basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/filter/PetFilterTests.java index 799168e8..a75f410d 100644 --- a/basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/filter/PetFilterTests.java +++ b/basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/filter/PetFilterTests.java @@ -25,8 +25,8 @@ import static org.springframework.integration.test.matcher.PayloadMatcher.hasPay import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.integration.Message; -import org.springframework.integration.MessageChannel; +import org.springframework.messaging.Message; +import org.springframework.messaging.MessageChannel; import org.springframework.integration.channel.QueueChannel; import org.springframework.integration.support.MessageBuilder; import org.springframework.test.context.ContextConfiguration; diff --git a/basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/gateway/GatewayTests.java b/basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/gateway/GatewayTests.java index b8ac08f2..1be115d8 100644 --- a/basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/gateway/GatewayTests.java +++ b/basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/gateway/GatewayTests.java @@ -23,7 +23,7 @@ import static org.springframework.integration.test.matcher.PayloadMatcher.hasPay import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.integration.Message; +import org.springframework.messaging.Message; import org.springframework.integration.channel.QueueChannel; import org.springframework.integration.file.FileHeaders; import org.springframework.test.context.ContextConfiguration; diff --git a/basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/router/PetRouterTests.java b/basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/router/PetRouterTests.java index f35a539a..9e2a20eb 100644 --- a/basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/router/PetRouterTests.java +++ b/basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/router/PetRouterTests.java @@ -23,8 +23,8 @@ import static org.springframework.integration.test.matcher.PayloadMatcher.hasPay import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.integration.Message; -import org.springframework.integration.MessageChannel; +import org.springframework.messaging.Message; +import org.springframework.messaging.MessageChannel; import org.springframework.integration.channel.QueueChannel; import org.springframework.integration.support.MessageBuilder; import org.springframework.test.context.ContextConfiguration; diff --git a/basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/splitter/CommaDelimitedSplitterTests.java b/basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/splitter/CommaDelimitedSplitterTests.java index f7dd1d4a..4ae9a7a2 100644 --- a/basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/splitter/CommaDelimitedSplitterTests.java +++ b/basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/splitter/CommaDelimitedSplitterTests.java @@ -26,8 +26,8 @@ import java.util.List; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.integration.Message; -import org.springframework.integration.MessageChannel; +import org.springframework.messaging.Message; +import org.springframework.messaging.MessageChannel; import org.springframework.integration.channel.QueueChannel; import org.springframework.integration.support.MessageBuilder; import org.springframework.test.context.ContextConfiguration; diff --git a/basic/twitter/pom.xml b/basic/twitter/pom.xml index a19d73c8..d5888fea 100644 --- a/basic/twitter/pom.xml +++ b/basic/twitter/pom.xml @@ -12,7 +12,7 @@ UTF-8 - 3.0.2.RELEASE + 4.0.0.RC1 1.2.17 4.10 diff --git a/basic/twitter/src/test/java/org/springframework/integration/samples/twitter/TwitterSendUpdatesSample.java b/basic/twitter/src/test/java/org/springframework/integration/samples/twitter/TwitterSendUpdatesSample.java index a6ad58cf..6b6cf944 100644 --- a/basic/twitter/src/test/java/org/springframework/integration/samples/twitter/TwitterSendUpdatesSample.java +++ b/basic/twitter/src/test/java/org/springframework/integration/samples/twitter/TwitterSendUpdatesSample.java @@ -19,9 +19,9 @@ import org.junit.Test; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.integration.Message; -import org.springframework.integration.MessageChannel; -import org.springframework.integration.message.GenericMessage; +import org.springframework.messaging.Message; +import org.springframework.messaging.MessageChannel; +import org.springframework.messaging.support.GenericMessage; /** * @author Oleg Zhurakousky diff --git a/basic/ws-inbound-gateway/pom.xml b/basic/ws-inbound-gateway/pom.xml index 64bc7fb5..86a63b7e 100644 --- a/basic/ws-inbound-gateway/pom.xml +++ b/basic/ws-inbound-gateway/pom.xml @@ -12,8 +12,8 @@ UTF-8 - 3.0.2.RELEASE - 3.2.8.RELEASE + 4.0.0.RC1 + 4.0.3.RELEASE 1.2.17 4.10 diff --git a/basic/ws-outbound-gateway/pom.xml b/basic/ws-outbound-gateway/pom.xml index 438e34ed..2d51ecae 100644 --- a/basic/ws-outbound-gateway/pom.xml +++ b/basic/ws-outbound-gateway/pom.xml @@ -12,7 +12,7 @@ UTF-8 - 3.0.2.RELEASE + 4.0.0.RC1 1.2.17 4.10 1.3.19 diff --git a/basic/ws-outbound-gateway/src/main/java/org/springframework/integration/samples/ws/WebServiceDemoTestApp.java b/basic/ws-outbound-gateway/src/main/java/org/springframework/integration/samples/ws/WebServiceDemoTestApp.java index 13637b6b..c42b6855 100644 --- a/basic/ws-outbound-gateway/src/main/java/org/springframework/integration/samples/ws/WebServiceDemoTestApp.java +++ b/basic/ws-outbound-gateway/src/main/java/org/springframework/integration/samples/ws/WebServiceDemoTestApp.java @@ -17,11 +17,11 @@ package org.springframework.integration.samples.ws; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.integration.Message; -import org.springframework.integration.MessageChannel; import org.springframework.integration.support.MessageBuilder; import org.springframework.integration.support.channel.BeanFactoryChannelResolver; -import org.springframework.integration.support.channel.ChannelResolver; +import org.springframework.messaging.Message; +import org.springframework.messaging.MessageChannel; +import org.springframework.messaging.core.DestinationResolver; /** * Demonstrates a web service invocation through a Web Service outbound Gateway. @@ -35,7 +35,7 @@ public class WebServiceDemoTestApp { public static void main(String[] args) { ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("/META-INF/spring/integration/temperatureConversion.xml"); - ChannelResolver channelResolver = new BeanFactoryChannelResolver(context); + DestinationResolver channelResolver = new BeanFactoryChannelResolver(context); // Compose the XML message according to the server's schema String requestXml = @@ -47,7 +47,7 @@ public class WebServiceDemoTestApp { Message message = MessageBuilder.withPayload(requestXml).build(); // Send the Message to the handler's input channel - MessageChannel channel = channelResolver.resolveChannelName("fahrenheitChannel"); + MessageChannel channel = channelResolver.resolveDestination("fahrenheitChannel"); channel.send(message); } diff --git a/basic/xml/pom.xml b/basic/xml/pom.xml index 7034ccb5..97b884e7 100644 --- a/basic/xml/pom.xml +++ b/basic/xml/pom.xml @@ -12,7 +12,7 @@ UTF-8 - 3.0.2.RELEASE + 4.0.0.RC1 1.2.17 4.10 diff --git a/basic/xml/src/main/java/org/springframework/integration/samples/xml/BookOrderProcessingTestApp.java b/basic/xml/src/main/java/org/springframework/integration/samples/xml/BookOrderProcessingTestApp.java index d09f2e3b..1dd1ed16 100644 --- a/basic/xml/src/main/java/org/springframework/integration/samples/xml/BookOrderProcessingTestApp.java +++ b/basic/xml/src/main/java/org/springframework/integration/samples/xml/BookOrderProcessingTestApp.java @@ -25,8 +25,8 @@ import org.springframework.context.support.AbstractApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; -import org.springframework.integration.MessageChannel; -import org.springframework.integration.message.GenericMessage; +import org.springframework.messaging.MessageChannel; +import org.springframework.messaging.support.GenericMessage; /** * This example demonstrates the processing of an order for books using diff --git a/basic/xmpp/pom.xml b/basic/xmpp/pom.xml index c364016d..520f6ebe 100644 --- a/basic/xmpp/pom.xml +++ b/basic/xmpp/pom.xml @@ -12,7 +12,7 @@ UTF-8 - 3.0.2.RELEASE + 4.0.0.RC1 1.2.17 4.10 diff --git a/basic/xmpp/src/test/java/org/springframework/integration/samples/xmpp/SendInstantMessageSample.java b/basic/xmpp/src/test/java/org/springframework/integration/samples/xmpp/SendInstantMessageSample.java index 0b2b6689..3905ff9a 100644 --- a/basic/xmpp/src/test/java/org/springframework/integration/samples/xmpp/SendInstantMessageSample.java +++ b/basic/xmpp/src/test/java/org/springframework/integration/samples/xmpp/SendInstantMessageSample.java @@ -19,9 +19,9 @@ import org.junit.Test; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.integration.Message; -import org.springframework.integration.MessageChannel; -import org.springframework.integration.message.GenericMessage; +import org.springframework.messaging.Message; +import org.springframework.messaging.MessageChannel; +import org.springframework.messaging.support.GenericMessage; /** * @author Oleg Zhurakousky diff --git a/intermediate/async-gateway/pom.xml b/intermediate/async-gateway/pom.xml index 0c226881..e3dac1d3 100644 --- a/intermediate/async-gateway/pom.xml +++ b/intermediate/async-gateway/pom.xml @@ -13,7 +13,7 @@ UTF-8 - 3.0.2.RELEASE + 4.0.0.RC1 1.2.17 4.10 diff --git a/intermediate/dynamic-poller/pom.xml b/intermediate/dynamic-poller/pom.xml index 85e31848..67f8ac82 100644 --- a/intermediate/dynamic-poller/pom.xml +++ b/intermediate/dynamic-poller/pom.xml @@ -16,7 +16,7 @@ UTF-8 - 3.0.2.RELEASE + 4.0.0.RC1 1.2.17 4.10 org.springframework.integration.samples.poller.Main diff --git a/intermediate/errorhandling/pom.xml b/intermediate/errorhandling/pom.xml index 24c3c2c9..3d2bb75b 100644 --- a/intermediate/errorhandling/pom.xml +++ b/intermediate/errorhandling/pom.xml @@ -13,7 +13,7 @@ UTF-8 - 3.0.2.RELEASE + 4.0.0.RC1 1.2.17 4.10 diff --git a/intermediate/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/ErrorUnwrapper.java b/intermediate/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/ErrorUnwrapper.java index b2fe72ab..5def521e 100644 --- a/intermediate/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/ErrorUnwrapper.java +++ b/intermediate/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/ErrorUnwrapper.java @@ -15,11 +15,11 @@ package org.springframework.integration.samples.errorhandling; -import org.springframework.integration.Message; -import org.springframework.integration.MessagingException; +import org.springframework.messaging.Message; +import org.springframework.messaging.MessagingException; import org.springframework.integration.annotation.MessageEndpoint; import org.springframework.integration.annotation.Transformer; -import org.springframework.integration.message.ErrorMessage; +import org.springframework.messaging.support.ErrorMessage; /** * @author Iwein Fuld diff --git a/intermediate/file-processing/pom.xml b/intermediate/file-processing/pom.xml index 6d3cec1c..8d9dc11e 100644 --- a/intermediate/file-processing/pom.xml +++ b/intermediate/file-processing/pom.xml @@ -7,7 +7,7 @@ UTF-8 - 3.0.2.RELEASE + 4.0.0.RC1 1.2.17 4.10 diff --git a/intermediate/file-processing/src/test/java/org/springframework/integration/samples/fileprocessing/FileProcessingTest.java b/intermediate/file-processing/src/test/java/org/springframework/integration/samples/fileprocessing/FileProcessingTest.java index bddf2123..462e22ae 100644 --- a/intermediate/file-processing/src/test/java/org/springframework/integration/samples/fileprocessing/FileProcessingTest.java +++ b/intermediate/file-processing/src/test/java/org/springframework/integration/samples/fileprocessing/FileProcessingTest.java @@ -12,7 +12,7 @@ import org.junit.Before; import org.junit.Test; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.integration.core.PollableChannel; +import org.springframework.messaging.PollableChannel; /** * @author Oleg Zhurakousky diff --git a/intermediate/mail-attachments/pom.xml b/intermediate/mail-attachments/pom.xml index 3e0b1320..ff848d91 100644 --- a/intermediate/mail-attachments/pom.xml +++ b/intermediate/mail-attachments/pom.xml @@ -8,8 +8,8 @@ UTF-8 - 3.0.2.RELEASE - 3.2.8.RELEASE + 4.0.0.RC1 + 4.0.3.RELEASE 1.2.17 4.10 diff --git a/intermediate/mail-attachments/src/main/java/org/springframework/integration/samples/mailattachments/support/EmailSplitter.java b/intermediate/mail-attachments/src/main/java/org/springframework/integration/samples/mailattachments/support/EmailSplitter.java index 98a65593..b002b66b 100644 --- a/intermediate/mail-attachments/src/main/java/org/springframework/integration/samples/mailattachments/support/EmailSplitter.java +++ b/intermediate/mail-attachments/src/main/java/org/springframework/integration/samples/mailattachments/support/EmailSplitter.java @@ -18,7 +18,7 @@ package org.springframework.integration.samples.mailattachments.support; import java.util.ArrayList; import java.util.List; -import org.springframework.integration.Message; +import org.springframework.messaging.Message; import org.springframework.integration.annotation.Splitter; import org.springframework.integration.file.FileHeaders; import org.springframework.integration.support.MessageBuilder; diff --git a/intermediate/monitoring/pom.xml b/intermediate/monitoring/pom.xml index 5e99b4d9..3f49ce29 100644 --- a/intermediate/monitoring/pom.xml +++ b/intermediate/monitoring/pom.xml @@ -16,8 +16,8 @@ UTF-8 - 3.0.2.RELEASE - 3.2.8.RELEASE + 4.0.0.RC1 + 4.0.3.RELEASE 1.2.17 4.10 diff --git a/intermediate/monitoring/src/main/java/org/springintegration/PayloadAwareTimingInterceptor.java b/intermediate/monitoring/src/main/java/org/springintegration/PayloadAwareTimingInterceptor.java index a50b78f2..c365215a 100644 --- a/intermediate/monitoring/src/main/java/org/springintegration/PayloadAwareTimingInterceptor.java +++ b/intermediate/monitoring/src/main/java/org/springintegration/PayloadAwareTimingInterceptor.java @@ -19,9 +19,9 @@ import java.util.Map; import java.util.Map.Entry; import java.util.concurrent.ConcurrentHashMap; -import org.springframework.integration.Message; -import org.springframework.integration.MessageChannel; -import org.springframework.integration.channel.interceptor.ChannelInterceptorAdapter; +import org.springframework.messaging.Message; +import org.springframework.messaging.MessageChannel; +import org.springframework.messaging.support.ChannelInterceptorAdapter; import org.springframework.jmx.export.annotation.ManagedOperation; import org.springframework.jmx.export.annotation.ManagedResource; import org.springframework.util.StopWatch; diff --git a/intermediate/monitoring/src/main/java/org/springintegration/service/impl/DefaultTwitterService.java b/intermediate/monitoring/src/main/java/org/springintegration/service/impl/DefaultTwitterService.java index e9160f25..c3a1d482 100644 --- a/intermediate/monitoring/src/main/java/org/springintegration/service/impl/DefaultTwitterService.java +++ b/intermediate/monitoring/src/main/java/org/springintegration/service/impl/DefaultTwitterService.java @@ -21,8 +21,8 @@ import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.integration.Message; -import org.springframework.integration.MessageChannel; +import org.springframework.messaging.Message; +import org.springframework.messaging.MessageChannel; import org.springframework.integration.endpoint.SourcePollingChannelAdapter; import org.springframework.integration.model.TwitterMessage; import org.springframework.integration.monitor.IntegrationMBeanExporter; diff --git a/intermediate/multipart-http/pom.xml b/intermediate/multipart-http/pom.xml index 4b9be2b1..27622d8e 100644 --- a/intermediate/multipart-http/pom.xml +++ b/intermediate/multipart-http/pom.xml @@ -8,8 +8,8 @@ war UTF-8 - 3.0.2.RELEASE - 3.2.8.RELEASE + 4.0.0.RC1 + 4.0.3.RELEASE 1.2.2 1.3.2 1.2.17 @@ -26,9 +26,9 @@ ${spring.integration.version} - org.codehaus.jackson - jackson-mapper-asl - 1.9.10 + com.fasterxml.jackson.core + jackson-databind + 2.3.2 compile true diff --git a/intermediate/multipart-http/src/test/java/org/springframework/integration/samples/multipart/MultipartClientForHttpOutboundClient.java b/intermediate/multipart-http/src/test/java/org/springframework/integration/samples/multipart/MultipartClientForHttpOutboundClient.java index 887b7084..0de502e1 100644 --- a/intermediate/multipart-http/src/test/java/org/springframework/integration/samples/multipart/MultipartClientForHttpOutboundClient.java +++ b/intermediate/multipart-http/src/test/java/org/springframework/integration/samples/multipart/MultipartClientForHttpOutboundClient.java @@ -19,6 +19,7 @@ import java.util.HashMap; import java.util.Map; import org.apache.log4j.Logger; + import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.core.io.ClassPathResource; @@ -29,7 +30,7 @@ import org.springframework.http.HttpStatus; * */ public class MultipartClientForHttpOutboundClient { - + private static Logger logger = Logger.getLogger(MultipartClientForHttpOutboundClient.class); private static String resourcePath = "org/springframework/integration/samples/multipart/spring09_logo.png"; diff --git a/intermediate/rest-http/pom.xml b/intermediate/rest-http/pom.xml index 9f5fd075..09e9edd0 100644 --- a/intermediate/rest-http/pom.xml +++ b/intermediate/rest-http/pom.xml @@ -13,8 +13,8 @@ - 3.0.2.RELEASE - 3.2.8.RELEASE + 4.0.0.RC1 + 4.0.3.RELEASE 3.1.4.RELEASE 1.2 1.3.2 @@ -31,9 +31,9 @@ ${spring.integration.version} - org.codehaus.jackson - jackson-mapper-asl - 1.8.0 + com.fasterxml.jackson.core + jackson-databind + 2.3.2 compile @@ -76,12 +76,24 @@ spring-security-core compile ${spring.security.version} + + + org.springframework + spring-support + + org.springframework.security spring-security-config compile ${spring.security.version} + + + org.springframework + spring-support + + org.springframework.security diff --git a/intermediate/rest-http/src/main/java/org/springframework/integration/samples/rest/json/JaxbJacksonObjectMapper.java b/intermediate/rest-http/src/main/java/org/springframework/integration/samples/rest/json/JaxbJacksonObjectMapper.java index 74bfe3b9..f1dd9d10 100644 --- a/intermediate/rest-http/src/main/java/org/springframework/integration/samples/rest/json/JaxbJacksonObjectMapper.java +++ b/intermediate/rest-http/src/main/java/org/springframework/integration/samples/rest/json/JaxbJacksonObjectMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2010 the original author or authors. + * Copyright 2002-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,10 +15,11 @@ */ package org.springframework.integration.samples.rest.json; -import org.codehaus.jackson.map.AnnotationIntrospector; -import org.codehaus.jackson.map.DeserializationConfig; -import org.codehaus.jackson.map.ObjectMapper; -import org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector; +import com.fasterxml.jackson.databind.AnnotationIntrospector; +import com.fasterxml.jackson.databind.DeserializationConfig; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector; + /** * JaxbJacksonObjectMapper.java: This is the custom JAXB JSON ObjectMapper @@ -27,22 +28,26 @@ import org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector; * http://hillert.blogspot.com/2011/01/marshal-json-data-using-jackson-in.html. * I modified a little bit to use the latest {@link DeserializationConfig} API * instead of deprecated ones. - *

* + *

+ * Updated to Jackson2. + *

* @author Vigil Bose + * @author Gary Russell */ +@SuppressWarnings("serial") public class JaxbJacksonObjectMapper extends ObjectMapper { /** - * Annotation introspector to use for serialization process + * Annotation introspector to use for serialization process * is configured separately for serialization and deserialization purposes */ public JaxbJacksonObjectMapper() { final AnnotationIntrospector introspector = new JacksonAnnotationIntrospector(); super.getDeserializationConfig() - .withAnnotationIntrospector(introspector); + .with(introspector); super.getSerializationConfig() - .withAnnotationIntrospector(introspector); - + .with(introspector); + } } diff --git a/intermediate/rest-http/src/main/java/org/springframework/integration/samples/rest/json/view/ExtendedMappingJacksonJsonView.java b/intermediate/rest-http/src/main/java/org/springframework/integration/samples/rest/json/view/ExtendedMappingJacksonJsonView.java index 6c817c70..8a47a2a6 100644 --- a/intermediate/rest-http/src/main/java/org/springframework/integration/samples/rest/json/view/ExtendedMappingJacksonJsonView.java +++ b/intermediate/rest-http/src/main/java/org/springframework/integration/samples/rest/json/view/ExtendedMappingJacksonJsonView.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2010 the original author or authors. + * Copyright 2002-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,17 +17,18 @@ package org.springframework.integration.samples.rest.json.view; import java.util.Map; -import org.springframework.web.servlet.view.json.MappingJacksonJsonView; +import org.springframework.web.servlet.view.json.MappingJackson2JsonView; /** * ExtendedMappingJacksonJsonView.java: This class extends the Spring's MappingJacksonJsonView *

* Note: The source code for this class is taken from the forum posted by AhungerArtist * at http://forum.springsource.org/archive/index.php/t-84006.html - *

+ *

* @author Vigil Bose + * @author Gary Russell */ -public class ExtendedMappingJacksonJsonView extends MappingJacksonJsonView { +public class ExtendedMappingJacksonJsonView extends MappingJackson2JsonView { @SuppressWarnings({"rawtypes" }) @Override @@ -36,10 +37,10 @@ public class ExtendedMappingJacksonJsonView extends MappingJacksonJsonView { if (!(result instanceof Map)){ return result; } - + Map map = (Map) result; if (map.size() == 1){ - return map.values().toArray()[0]; + return map.values().toArray()[0]; } return map; } diff --git a/intermediate/rest-http/src/main/java/org/springframework/integration/samples/rest/service/EmployeeSearchService.java b/intermediate/rest-http/src/main/java/org/springframework/integration/samples/rest/service/EmployeeSearchService.java index 88b42ead..d618135b 100644 --- a/intermediate/rest-http/src/main/java/org/springframework/integration/samples/rest/service/EmployeeSearchService.java +++ b/intermediate/rest-http/src/main/java/org/springframework/integration/samples/rest/service/EmployeeSearchService.java @@ -19,9 +19,9 @@ import java.util.HashMap; import java.util.Map; import org.apache.log4j.Logger; -import org.springframework.integration.Message; -import org.springframework.integration.MessageHeaders; -import org.springframework.integration.message.GenericMessage; +import org.springframework.messaging.Message; +import org.springframework.messaging.MessageHeaders; +import org.springframework.messaging.support.GenericMessage; import org.springframework.integration.samples.rest.domain.Employee; import org.springframework.integration.samples.rest.domain.EmployeeList; import org.springframework.security.access.annotation.Secured; diff --git a/intermediate/rest-http/src/main/resources/META-INF/spring/integration/applicationContext-http-int.xml b/intermediate/rest-http/src/main/resources/META-INF/spring/integration/applicationContext-http-int.xml index 9f9a8ec2..1f8963c2 100644 --- a/intermediate/rest-http/src/main/resources/META-INF/spring/integration/applicationContext-http-int.xml +++ b/intermediate/rest-http/src/main/resources/META-INF/spring/integration/applicationContext-http-int.xml @@ -61,7 +61,7 @@ - + (EmployeeList.class, restTemplate.getMessageConverters()); - + Map properties = new HashMap(); properties.put(javax.xml.bind.Marshaller.JAXB_ENCODING, "UTF-8"); properties.put(javax.xml.bind.Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); marshaller.setMarshallerProperties(properties); } /** - * + * * @throws Exception */ @Test @@ -107,21 +110,23 @@ public class RestHttpClientTest { employeeSearchMap.put("id", id); return employeeSearchMap; } - + @Test public void testGetEmployeeAsJson() throws Exception{ Map employeeSearchMap = getEmployeeSearchMap("0"); - + final String fullUrl = "http://localhost:8080/rest-http/services/employee/{id}/search?format=json"; HttpHeaders headers = getHttpHeadersWithUserCredentials(new HttpHeaders()); headers.add("Accept", "application/json"); HttpEntity request = new HttpEntity(headers); - + ResponseEntity httpResponse = restTemplate.exchange(fullUrl, HttpMethod.GET, request, EmployeeList.class, employeeSearchMap); logger.info("Return Status :"+httpResponse.getHeaders().get("X-Return-Status")); logger.info("Return Status Message :"+httpResponse.getHeaders().get("X-Return-Status-Msg")); assertTrue(httpResponse.getStatusCode().equals(HttpStatus.OK)); - jaxbJacksonObjectMapper.writeValue(System.out, httpResponse.getBody()); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + jaxbJacksonObjectMapper.writeValue(out, httpResponse.getBody()); + logger.info(new String(out.toByteArray())); } private HttpHeaders getHttpHeadersWithUserCredentials(ClientHttpRequest request){ diff --git a/intermediate/rest-http/src/test/resources/META-INF/spring/integration/http-outbound-config.xml b/intermediate/rest-http/src/test/resources/META-INF/spring/integration/http-outbound-config.xml index 6538278f..81ae6f98 100644 --- a/intermediate/rest-http/src/test/resources/META-INF/spring/integration/http-outbound-config.xml +++ b/intermediate/rest-http/src/test/resources/META-INF/spring/integration/http-outbound-config.xml @@ -19,7 +19,7 @@ - + @@ -28,7 +28,7 @@ - + diff --git a/intermediate/retry-and-more/pom.xml b/intermediate/retry-and-more/pom.xml index 6c1bc35b..d68cc6ae 100644 --- a/intermediate/retry-and-more/pom.xml +++ b/intermediate/retry-and-more/pom.xml @@ -14,8 +14,8 @@ UTF-8 - 3.0.2.RELEASE - 3.2.8.RELEASE + 4.0.0.RC1 + 4.0.3.RELEASE 1.2.17 4.10 diff --git a/intermediate/splitter-aggregator-reaper/pom.xml b/intermediate/splitter-aggregator-reaper/pom.xml index c494004e..f3268651 100644 --- a/intermediate/splitter-aggregator-reaper/pom.xml +++ b/intermediate/splitter-aggregator-reaper/pom.xml @@ -20,11 +20,11 @@ UTF-8 - 3.0.2.RELEASE + 4.0.0.RC1 1.2.16 4.10 1 - 3.2.8.RELEASE + 4.0.3.RELEASE diff --git a/intermediate/splitter-aggregator-reaper/src/test/java/org/springframework/integration/samples/splitteraggregator/TestSplitterAggregator.java b/intermediate/splitter-aggregator-reaper/src/test/java/org/springframework/integration/samples/splitteraggregator/TestSplitterAggregator.java index 48171dad..21547571 100644 --- a/intermediate/splitter-aggregator-reaper/src/test/java/org/springframework/integration/samples/splitteraggregator/TestSplitterAggregator.java +++ b/intermediate/splitter-aggregator-reaper/src/test/java/org/springframework/integration/samples/splitteraggregator/TestSplitterAggregator.java @@ -23,6 +23,7 @@ import javax.inject.Inject; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.integration.samples.splitteraggregator.support.TestUtils; +import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @@ -35,6 +36,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration({"classpath:META-INF/spring/integration/spring-integration-context.xml"}) +@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD) public class TestSplitterAggregator { @Inject diff --git a/intermediate/stored-procedures-derby/pom.xml b/intermediate/stored-procedures-derby/pom.xml index bfa3f17d..1267c77e 100644 --- a/intermediate/stored-procedures-derby/pom.xml +++ b/intermediate/stored-procedures-derby/pom.xml @@ -16,7 +16,7 @@ UTF-8 - 3.0.2.RELEASE + 4.0.0.RC1 1.2.17 4.10 diff --git a/intermediate/stored-procedures-ms/pom.xml b/intermediate/stored-procedures-ms/pom.xml index 684fbff2..e0f63f77 100644 --- a/intermediate/stored-procedures-ms/pom.xml +++ b/intermediate/stored-procedures-ms/pom.xml @@ -17,7 +17,7 @@ UTF-8 - 3.0.2.RELEASE + 4.0.0.RC1 1.2.17 4.10 diff --git a/intermediate/stored-procedures-oracle/pom.xml b/intermediate/stored-procedures-oracle/pom.xml index 8bb7915b..4b21e4f7 100644 --- a/intermediate/stored-procedures-oracle/pom.xml +++ b/intermediate/stored-procedures-oracle/pom.xml @@ -16,7 +16,7 @@ UTF-8 - 3.0.2.RELEASE + 4.0.0.RC1 1.2.17 4.10 diff --git a/intermediate/stored-procedures-postgresql/pom.xml b/intermediate/stored-procedures-postgresql/pom.xml index 759ebe05..027bdafb 100644 --- a/intermediate/stored-procedures-postgresql/pom.xml +++ b/intermediate/stored-procedures-postgresql/pom.xml @@ -16,7 +16,7 @@ UTF-8 - 3.0.2.RELEASE + 4.0.0.RC1 1.2.17 4.10 diff --git a/intermediate/tcp-client-server-multiplex/pom.xml b/intermediate/tcp-client-server-multiplex/pom.xml index 504e1523..dad27d6e 100644 --- a/intermediate/tcp-client-server-multiplex/pom.xml +++ b/intermediate/tcp-client-server-multiplex/pom.xml @@ -14,8 +14,8 @@ UTF-8 - 3.2.8.RELEASE - 3.0.2.RELEASE + 4.0.3.RELEASE + 4.0.0.RC1 1.2.17 4.10 diff --git a/intermediate/travel/pom.xml b/intermediate/travel/pom.xml index 7cc94039..bd25a77d 100644 --- a/intermediate/travel/pom.xml +++ b/intermediate/travel/pom.xml @@ -12,10 +12,10 @@ UTF-8 - 3.0.2.RELEASE + 4.0.0.RC1 1.2.17 4.10 - 3.2.8.RELEASE + 4.0.3.RELEASE org.springframework.integration.samples.travel.Main diff --git a/intermediate/tx-synch/pom.xml b/intermediate/tx-synch/pom.xml index 83b9bdf3..96cd3bf6 100755 --- a/intermediate/tx-synch/pom.xml +++ b/intermediate/tx-synch/pom.xml @@ -14,8 +14,8 @@ UTF-8 - 3.0.2.RELEASE - 3.2.8.RELEASE + 4.0.0.RC1 + 4.0.3.RELEASE 1.2.17 4.10