diff --git a/README.md b/README.md
index 1400aa27..362f4534 100644
--- a/README.md
+++ b/README.md
@@ -43,6 +43,7 @@ This directory holds demos/samples for Spring Integration 4.0 Java Configuration
This is a good place to get started. The samples here are technically motivated and demonstrate the bare minimum with regard to configuration and code to help you to get introduced to the basic concepts, API and configuration of Spring Integration. For example, if you are looking for an answer on how to wire a **Service Activator** to a **Channel** or how to apply a **Gateway** to your message exchange or how to get started with using the **MAIL** or **XML** module, this would be the right place to find a relevant sample. The bottom line is that this is a good starting point.
* **amqp** - Demonstrates the functionality of the various **AMQP Adapters**
+* **barrier** - Shows how to suspend a thread until some asynchronous event occurs
* **control-bus** - Demonstrates the functionality of the **Control Bus**
* **enricher** - This sample demonstrates how the Enricher components can be used
* **feed** - Demonstrates the functionality of the **Feed Adapter** (RSS/ATOM)
@@ -106,7 +107,7 @@ This category targets developers and architects who have a good understanding of
* **cafe** - Emulates a simple operation of a coffee shop combining various Spring Integration adapters (Including **Router** and **Splitter**) see [Appendix A of the reference documentation](http://static.springsource.org/spring-integration/docs/latest-ga/reference/html/samples.html) for more details. Implementations are provided for:
- AMQP
- JMS
- - In memory channels
+ - In memory channels
* **cafe-scripted** - Scripted implementation of the classic **cafe** sample application. Supports **JavaScript**, **Groovy**, **Ruby**, and **Python**.
* **loan-broker** - Simulates a simple banking application (Uses **Gateway**, **Chain**, **Header Enricher**, **Recipient List Router**, **Aggregator**) see [Appendix A of the reference documentation](http://static.springsource.org/spring-integration/docs/latest-ga/reference/html/samples.html) for more details
* **loanshark** This extension to the loan broker sample shows how to exchange messages between Spring Integration applications (and other technologies) using **UDP**.
diff --git a/basic/barrier/README.md b/basic/barrier/README.md
new file mode 100644
index 00000000..15880f4a
--- /dev/null
+++ b/basic/barrier/README.md
@@ -0,0 +1,44 @@
+Barrier Sample
+==============
+
+This example demonstrates the use of a process barrier component to suspend a thread until some asynchronous operation
+completes. It uses an **HTTP Inbound Gateway**, splits the request, sends the splits to rabbitmq and then waits for
+the publisher confirms. Finally, the results are returned to the caller.
+
+The sample is a Spring Boot application that loads 2 contexts:
+
+* Client - Sends **A,B,C** to the server
+* Server - Web application
+
+The server context has 3 integration flows:
+
+```
+http -> splitter -> amqp
+ |-> barrier
+
+amqp(Acks) -> aggregator -> barrier (release)
+
+qmqp(inbound) -> nullChannel
+```
+
+The last flow drains the messages and allows the auto-delete queue to be removed when the application is closed.
+
+## Running the sample
+
+
+ $ gradlew :barrier:run
+
+This will package the application and run it using the [Gradle Application Plugin](http://www.gradle.org/docs/current/userguide/application_plugin.html)
+
+#### Using an IDE such as SpringSource Tool Suite⢠(STS)
+
+In STS (Eclipse), go to package **org.springframework.integration.samples.barrier**, right-click **Application** and select **Run as** --> **Java Application** (or Spring Boot Application).
+
+### Output
+
+The gateway (**client**) initiates a simple request posting "A,B,C" to the **server** and the **server** responds with the results.
+You should see the following output from the server:
+
+ ++++++++++++ Replied with: Result: A: ack=true, B: ack=true, C: ack=true ++++++++++++
+
+
diff --git a/basic/barrier/pom.xml b/basic/barrier/pom.xml
new file mode 100644
index 00000000..d9471e8c
--- /dev/null
+++ b/basic/barrier/pom.xml
@@ -0,0 +1,140 @@
+
+
+ 4.0.0
+
+ spring-boot-starter-parent
+ org.springframework.boot
+ 1.2.5.RELEASE
+
+ org.springframework.integration.samples
+ barrier
+ 4.1.0.BUILD-SNAPSHOT
+ Barrier Sample
+ Barrier Sample
+ http://projects.spring.io/spring-integration
+
+ SpringIO
+ https://spring.io
+
+
+
+ The Apache Software License, Version 2.0
+ http://www.apache.org/licenses/LICENSE-2.0.txt
+ repo
+
+
+
+
+ garyrussell
+ Gary Russell
+ grussell@pivotal.io
+
+ project lead
+
+
+
+ markfisher
+ Mark Fisher
+ mfisher@pivotal.io
+
+ project founder and lead emeritus
+
+
+
+ ghillert
+ Gunnar Hillert
+ ghillert@pivotal.io
+
+
+ abilan
+ Artem Bilan
+ abilan@pivotal.io
+
+
+
+ scm:git:scm:git:git://github.com/spring-projects/spring-integration-samples.git
+ scm:git:scm:git:ssh://git@github.com:spring-projects/spring-integration-samples.git
+ https://github.com/spring-projects/spring-integration-samples
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+
+
+ repo.spring.io.milestone
+ Spring Framework Maven Milestone Repository
+ https://repo.spring.io/libs-milestone
+
+
+
+
+ org.springframework.integration
+ spring-integration-http
+ 4.2.0.BUILD-SNAPSHOT
+ compile
+
+
+ junit
+ junit
+ 4.11
+ test
+
+
+ org.springframework
+ spring-test
+ 4.1.7.RELEASE
+ test
+
+
+ org.hamcrest
+ hamcrest-all
+ 1.3
+ test
+
+
+ org.springframework.integration
+ spring-integration-core
+ 4.2.0.BUILD-SNAPSHOT
+ compile
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ org.springframework.boot
+ spring-boot-starter-integration
+ compile
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+ compile
+
+
+ log4j
+ log4j
+ 1.2.17
+ compile
+
+
+ org.springframework.integration
+ spring-integration-amqp
+ 4.2.0.BUILD-SNAPSHOT
+ compile
+
+
+ org.mockito
+ mockito-core
+ 1.9.5
+ test
+
+
+
diff --git a/basic/barrier/src/main/java/org/springframework/integration/samples/barrier/AckAggregator.java b/basic/barrier/src/main/java/org/springframework/integration/samples/barrier/AckAggregator.java
new file mode 100644
index 00000000..96a5a5a7
--- /dev/null
+++ b/basic/barrier/src/main/java/org/springframework/integration/samples/barrier/AckAggregator.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2015 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.springframework.integration.samples.barrier;
+
+import org.springframework.amqp.support.AmqpHeaders;
+import org.springframework.integration.aggregator.MessageGroupProcessor;
+import org.springframework.integration.store.MessageGroup;
+import org.springframework.messaging.Message;
+
+/**
+ * @author Gary Russell
+ * @since 4.2
+ *
+ */
+public class AckAggregator implements MessageGroupProcessor {
+
+ @Override
+ public Object processMessageGroup(MessageGroup group) {
+ StringBuilder builder = new StringBuilder("Result: ");
+ for (Message> message : group.getMessages()) {
+ if (builder.length() > 8) {
+ builder.append(", ");
+ }
+ builder.append(message.getPayload() + ": ack=" + message.getHeaders().get(AmqpHeaders.PUBLISH_CONFIRM));
+ }
+ return builder.toString();
+ }
+
+}
diff --git a/basic/barrier/src/main/java/org/springframework/integration/samples/barrier/Application.java b/basic/barrier/src/main/java/org/springframework/integration/samples/barrier/Application.java
new file mode 100644
index 00000000..a74a4985
--- /dev/null
+++ b/basic/barrier/src/main/java/org/springframework/integration/samples/barrier/Application.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2015 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.springframework.integration.samples.barrier;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.ImportResource;
+
+/**
+ * @author Gary Russell
+ * @since 4.2
+ */
+@Configuration
+@EnableAutoConfiguration
+@ImportResource("/META-INF/spring/integration/server-context.xml")
+public class Application {
+
+ public static void main(String[] args) throws Exception {
+ ConfigurableApplicationContext server = SpringApplication.run(Application.class, args);
+ ConfigurableApplicationContext client
+ = new SpringApplicationBuilder("/META-INF/spring/integration/client-context.xml")
+ .web(false)
+ .run(args);
+ RequestGateway requestGateway = client.getBean("requestGateway", RequestGateway.class);
+ String request = "A,B,C";
+ System.out.println("\n\n++++++++++++ Sending: " + request + " ++++++++++++\n");
+ String reply = requestGateway.echo(request);
+ System.out.println("\n\n++++++++++++ Replied with: " + reply + " ++++++++++++\n");
+ client.close();
+ server.close();
+ System.exit(0); // AMQP-519
+ }
+
+
+}
diff --git a/basic/barrier/src/main/java/org/springframework/integration/samples/barrier/RequestGateway.java b/basic/barrier/src/main/java/org/springframework/integration/samples/barrier/RequestGateway.java
new file mode 100644
index 00000000..dcb0d36e
--- /dev/null
+++ b/basic/barrier/src/main/java/org/springframework/integration/samples/barrier/RequestGateway.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2002-2012 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.springframework.integration.samples.barrier;
+
+
+/**
+ * @author Oleg Zhurakousky
+ * @author Gunnar Hillert
+ *
+ */
+public interface RequestGateway {
+
+ String echo(String request);
+
+}
diff --git a/basic/barrier/src/main/resources/META-INF/spring/integration/client-context.xml b/basic/barrier/src/main/resources/META-INF/spring/integration/client-context.xml
new file mode 100644
index 00000000..679e3df4
--- /dev/null
+++ b/basic/barrier/src/main/resources/META-INF/spring/integration/client-context.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/basic/barrier/src/main/resources/META-INF/spring/integration/server-context.xml b/basic/barrier/src/main/resources/META-INF/spring/integration/server-context.xml
new file mode 100644
index 00000000..b6403b7d
--- /dev/null
+++ b/basic/barrier/src/main/resources/META-INF/spring/integration/server-context.xml
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/basic/barrier/src/main/resources/logback.xml b/basic/barrier/src/main/resources/logback.xml
new file mode 100644
index 00000000..070671ef
--- /dev/null
+++ b/basic/barrier/src/main/resources/logback.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+ %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
+
+
+
+
+
+
+
diff --git a/basic/barrier/src/test/java/org/springframework/integration/samples/barrier/ApplicationTests.java b/basic/barrier/src/test/java/org/springframework/integration/samples/barrier/ApplicationTests.java
new file mode 100644
index 00000000..5eaf56c9
--- /dev/null
+++ b/basic/barrier/src/test/java/org/springframework/integration/samples/barrier/ApplicationTests.java
@@ -0,0 +1,38 @@
+package org.springframework.integration.samples.barrier;
+/*
+ * Copyright 2015 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import org.springframework.boot.test.SpringApplicationConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+/**
+ * @author Gary Russell
+ * @since 4.2
+ */
+@RunWith(SpringJUnit4ClassRunner.class)
+@SpringApplicationConfiguration(classes = Application.class)
+public class ApplicationTests {
+
+ @Test
+ public void contextLoads() {
+ }
+
+}
diff --git a/basic/http/README.md b/basic/http/README.md
index 761383a0..e6163dbc 100644
--- a/basic/http/README.md
+++ b/basic/http/README.md
@@ -48,5 +48,5 @@ In STS (Eclipse), go to package **org.springframework.integration.samples.http**
The gateway (**client**) initiates a simple request posting "Hello" to the **server** and the **server** responds by appending **from the other side** to the message payload and returns. You should see the following output from the server:
- INFO : org.springframework.integration.samples.http.HttpClientDemo - Replied with: Hello from the other side
+ ++++++++++++ Replied with: Hello from the other side ++++++++++++
diff --git a/basic/http/src/main/java/org/springframework/integration/samples/http/HttpClientDemo.java b/basic/http/src/main/java/org/springframework/integration/samples/http/HttpClientDemo.java
index 47741720..1b15a8b2 100644
--- a/basic/http/src/main/java/org/springframework/integration/samples/http/HttpClientDemo.java
+++ b/basic/http/src/main/java/org/springframework/integration/samples/http/HttpClientDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2011 the original author or authors.
+ * Copyright 2002-2015 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,24 +17,23 @@ package org.springframework.integration.samples.http;
import org.apache.log4j.Logger;
-import org.springframework.context.ApplicationContext;
+import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
* @author Oleg Zhurakousky
+ * @author Gary Russell
*
*/
public class HttpClientDemo {
-
+
private static Logger logger = Logger.getLogger(HttpClientDemo.class);
- /**
- * @param args
- */
public static void main(String[] args) {
- ApplicationContext context = new ClassPathXmlApplicationContext("/META-INF/spring/integration/http-outbound-config.xml");
+ ConfigurableApplicationContext context = new ClassPathXmlApplicationContext(
+ "/META-INF/spring/integration/http-outbound-config.xml");
RequestGateway requestGateway = context.getBean("requestGateway", RequestGateway.class);
- String reply = requestGateway.echo("Hello");
- logger.info("Replied with: " + reply);
+ String reply = requestGateway.echo("Hello");
+ logger.info("\n\n++++++++++++ Replied with: " + reply + " ++++++++++++\n");
}
}
diff --git a/basic/http/src/main/webapp/WEB-INF/servlet-config.xml b/basic/http/src/main/webapp/WEB-INF/servlet-config.xml
index b4831c08..c61a810f 100644
--- a/basic/http/src/main/webapp/WEB-INF/servlet-config.xml
+++ b/basic/http/src/main/webapp/WEB-INF/servlet-config.xml
@@ -16,5 +16,8 @@
-
+
+
+
+
diff --git a/basic/http/src/test/java/log4j.xml b/basic/http/src/test/java/log4j.xml
deleted file mode 100644
index 89a1e58d..00000000
--- a/basic/http/src/test/java/log4j.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/basic/sftp/src/test/java/org/springframework/integration/samples/sftp/EmbeddedSftpServer.java b/basic/sftp/src/test/java/org/springframework/integration/samples/sftp/EmbeddedSftpServer.java
index 3dbb4388..2b85e657 100644
--- a/basic/sftp/src/test/java/org/springframework/integration/samples/sftp/EmbeddedSftpServer.java
+++ b/basic/sftp/src/test/java/org/springframework/integration/samples/sftp/EmbeddedSftpServer.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2014 the original author or authors.
+ * Copyright 2014-2015 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.
@@ -27,9 +27,7 @@ import java.util.Collections;
import org.apache.sshd.SshServer;
import org.apache.sshd.common.NamedFactory;
-import org.apache.sshd.common.file.FileSystemView;
-import org.apache.sshd.common.file.nativefs.NativeFileSystemFactory;
-import org.apache.sshd.common.file.nativefs.NativeFileSystemView;
+import org.apache.sshd.common.file.virtualfs.VirtualFileSystemFactory;
import org.apache.sshd.common.util.Base64;
import org.apache.sshd.server.Command;
import org.apache.sshd.server.PublickeyAuthenticator;
@@ -76,20 +74,7 @@ public class EmbeddedSftpServer implements InitializingBean, SmartLifecycle {
this.server.setKeyPairProvider(new SimpleGeneratorHostKeyProvider("hostkey.ser"));
this.server.setSubsystemFactories(Collections.>singletonList(new SftpSubsystem.Factory()));
final String virtualDir = new FileSystemResource("").getFile().getAbsolutePath();
- this.server.setFileSystemFactory(new NativeFileSystemFactory() {
-
- @Override
- public FileSystemView createFileSystemView(org.apache.sshd.common.Session session) {
- return new NativeFileSystemView(session.getUsername(), false) {
-
- @Override
- public String getVirtualUserDir() {
- return virtualDir;
- }
- };
- }
-
- });
+ server.setFileSystemFactory(new VirtualFileSystemFactory(virtualDir));
}
private PublicKey decodePublicKey() throws Exception {
diff --git a/basic/sftp/src/test/resources/META-INF/spring/integration/SftpInboundReceiveSample-context.xml b/basic/sftp/src/test/resources/META-INF/spring/integration/SftpInboundReceiveSample-context.xml
index 4743fe8f..eb71e674 100644
--- a/basic/sftp/src/test/resources/META-INF/spring/integration/SftpInboundReceiveSample-context.xml
+++ b/basic/sftp/src/test/resources/META-INF/spring/integration/SftpInboundReceiveSample-context.xml
@@ -20,6 +20,7 @@
+
+
+
diff --git a/build.gradle b/build.gradle
index b5775cff..a9bcdf43 100644
--- a/build.gradle
+++ b/build.gradle
@@ -26,10 +26,10 @@ allprojects {
group = 'org.springframework.integration.samples'
repositories {
- // mavenLocal()
+// mavenLocal()
maven { url 'http://repo.spring.io/libs-snapshot' }
maven { url 'http://repo.spring.io/libs-milestone' }
- // maven { url 'http://repo.spring.io/libs-staging-local' }
+// maven { url 'http://repo.spring.io/libs-staging-local' }
}
}
@@ -158,9 +158,9 @@ subprojects { subproject ->
sourceCompatibility = 1.6
ext {
- activeMqVersion = '5.11.0'
- apacheSshdVersion = '0.10.1'
- aspectjVersion = '1.8.0'
+ activeMqVersion = '5.11.1'
+ apacheSshdVersion = '0.13.0'
+ aspectjVersion = '1.8.4'
commonsDigesterVersion = '2.0'
commonsDbcpVersion = '1.2.2'
commonsFileUploadVersion = '1.2.2'
@@ -195,14 +195,14 @@ subprojects { subproject ->
mockitoVersion = '1.9.5'
openJpaVersion = '2.3.0'
oracleDriverVersion = '11.2.0.3'
- reactorSpringVersion = '1.1.3.RELEASE'
+ reactorVersion = '2.0.5.RELEASE'
postgresVersion = '9.1-901-1.jdbc4'
subethasmtpVersion = '1.2'
slf4jVersion = '1.7.11'
- springIntegrationVersion = '4.1.6.RELEASE'
- springIntegrationDslVersion = '1.0.2.RELEASE'
- springVersion = '4.1.7.RELEASE'
- springSecurityVersion = '3.2.4.RELEASE'
+ springIntegrationVersion = '4.2.0.RC1'
+ springIntegrationDslVersion = '1.1.0.BUILD-SNAPSHOT'
+ springVersion = '4.2.0.RELEASE'
+ springSecurityVersion = '4.0.2.RELEASE'
springWebFlowVersion = '2.3.3.RELEASE'
tilesJspVersion = '2.2.1'
validationApiVersion = '1.0.0.GA'
@@ -437,6 +437,26 @@ project('amqp') {
}
+project('barrier') {
+ description = 'Barrier Sample'
+
+ apply plugin: 'spring-boot'
+
+ dependencies {
+ compile 'org.springframework.boot:spring-boot-starter-web'
+ compile 'org.springframework.boot:spring-boot-starter-integration'
+ compile "org.springframework.integration:spring-integration-core:$springIntegrationVersion"
+ compile "org.springframework.integration:spring-integration-amqp:$springIntegrationVersion"
+ compile "org.springframework.integration:spring-integration-http:$springIntegrationVersion"
+
+ testCompile 'org.springframework.boot:spring-boot-starter-test'
+ }
+
+ springBoot {
+ mainClass = 'org.springframework.integration.samples.barrier.Application'
+ }
+}
+
project('control-bus') {
description = 'Control Bus Basic Sample'
@@ -553,7 +573,9 @@ project('si4demo') {
testCompile 'org.springframework.boot:spring-boot-starter-test'
}
- mainClassName = 'org.springframework.integration.samples.si4demo.dsl.Application'
+ springBoot {
+ mainClass = 'org.springframework.integration.samples.si4demo.dsl.Application'
+ }
tasks.withType(JavaExec) {
standardInput = System.in
@@ -570,14 +592,17 @@ project('cafe-dsl') {
dependencies {
compile project(":cafe-si")
compile 'org.springframework.boot:spring-boot-starter-integration'
- compile "org.springframework.integration:spring-integration-core"
+ compile "org.springframework.integration:spring-integration-core:$springIntegrationVersion"
compile "com.google.guava:guava:$guavaVersion"
compile "org.springframework.integration:spring-integration-java-dsl:$springIntegrationDslVersion"
+ compile "io.projectreactor:reactor-stream:$reactorVersion"
+ compile "io.projectreactor.spring:reactor-spring-context:$reactorVersion"
testCompile 'org.springframework.boot:spring-boot-starter-test'
}
-
- mainClassName = 'org.springframework.integration.samples.dsl.cafe.lambda.Application'
+ springBoot {
+ mainClass = 'org.springframework.integration.samples.dsl.cafe.lambda.Application'
+ }
}
@@ -847,7 +872,8 @@ project('async-gateway') {
dependencies {
compile "org.springframework.integration:spring-integration-core:$springIntegrationVersion"
- compile "org.projectreactor.spring:reactor-spring-context:$reactorSpringVersion"
+ compile "io.projectreactor:reactor-stream:$reactorVersion"
+ compile "io.projectreactor.spring:reactor-spring-context:$reactorVersion"
}
}
@@ -1130,7 +1156,9 @@ project('web-sockets') {
testCompile 'org.springframework.boot:spring-boot-starter-test'
}
- mainClassName = 'org.springframework.integration.samples.websocket.standard.server.Application'
+ springBoot {
+ mainClass = 'org.springframework.integration.samples.websocket.standard.server.Application'
+ }
tasks.withType(JavaExec) {
standardInput = System.in
@@ -1151,7 +1179,9 @@ project('stomp-chat') {
testCompile 'org.springframework.boot:spring-boot-starter-test'
}
- mainClassName = 'org.springframework.integration.samples.chat.stomp.server.Application'
+ springBoot {
+ mainClass = 'org.springframework.integration.samples.chat.stomp.server.Application'
+ }
tasks.withType(JavaExec) {
standardInput = System.in
diff --git a/dsl/si4demo/src/main/resources/logback.xml b/dsl/si4demo/src/main/resources/logback.xml
index ac9982f0..070671ef 100644
--- a/dsl/si4demo/src/main/resources/logback.xml
+++ b/dsl/si4demo/src/main/resources/logback.xml
@@ -11,4 +11,4 @@
-
\ No newline at end of file
+
diff --git a/gradle.properties b/gradle.properties
index c5dec156..5be86839 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,2 +1,2 @@
version=4.1.0.BUILD-SNAPSHOT
-springBootVersion=1.2.5.RELEASE
+springBootVersion=1.3.0.BUILD-SNAPSHOT
diff --git a/intermediate/async-gateway/src/test/java/org/springframework/integration/samples/async/gateway/ListenableFutureTest.java b/intermediate/async-gateway/src/test/java/org/springframework/integration/samples/async/gateway/ListenableFutureTest.java
index 0ffb8366..96343942 100644
--- a/intermediate/async-gateway/src/test/java/org/springframework/integration/samples/async/gateway/ListenableFutureTest.java
+++ b/intermediate/async-gateway/src/test/java/org/springframework/integration/samples/async/gateway/ListenableFutureTest.java
@@ -127,7 +127,7 @@ public class ListenableFutureTest {
}
- @MessagingGateway(defaultReplyTimeout = 0)
+ @MessagingGateway(defaultReplyTimeout = "0")
public interface MathGateway {
@Gateway(requestChannel = "gatewayChannel")
diff --git a/intermediate/async-gateway/src/test/java/org/springframework/integration/samples/async/gateway/PromiseTest.java b/intermediate/async-gateway/src/test/java/org/springframework/integration/samples/async/gateway/PromiseTest.java
index 3206951d..e9a08ec4 100644
--- a/intermediate/async-gateway/src/test/java/org/springframework/integration/samples/async/gateway/PromiseTest.java
+++ b/intermediate/async-gateway/src/test/java/org/springframework/integration/samples/async/gateway/PromiseTest.java
@@ -27,9 +27,6 @@ import org.apache.log4j.Logger;
import org.junit.Test;
import org.junit.runner.RunWith;
-import reactor.core.composable.Promise;
-import reactor.spring.context.config.EnableReactor;
-
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
@@ -49,6 +46,9 @@ import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import reactor.rx.Promise;
+import reactor.spring.context.config.EnableReactor;
+
/**
* @author Oleg Zhurakousky
* @author Gary Russell
@@ -88,8 +88,7 @@ public class PromiseTest {
failures.incrementAndGet();
logger.error("Unexpected exception for " + number, t);
latch.countDown();
- })
- .flush();
+ }).poll();
}
assertTrue(latch.await(60, TimeUnit.SECONDS));
assertEquals(0, failures.get());
@@ -123,7 +122,7 @@ public class PromiseTest {
}
- @MessagingGateway(defaultReplyTimeout = 0, reactorEnvironment = "reactorEnv")
+ @MessagingGateway(defaultReplyTimeout = "0", reactorEnvironment = "reactorEnv")
public interface MathGateway {
@Gateway(requestChannel = "gatewayChannel")
diff --git a/intermediate/travel/src/test/java/org/springframework/integration/samples/travel/TravelGatewayTest.java b/intermediate/travel/src/test/java/org/springframework/integration/samples/travel/TravelGatewayTest.java
index 1dc53ca8..33ea3a51 100644
--- a/intermediate/travel/src/test/java/org/springframework/integration/samples/travel/TravelGatewayTest.java
+++ b/intermediate/travel/src/test/java/org/springframework/integration/samples/travel/TravelGatewayTest.java
@@ -17,6 +17,7 @@ package org.springframework.integration.samples.travel;
import org.apache.log4j.Logger;
import org.junit.Assert;
+import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
@@ -34,6 +35,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
"classpath:META-INF/spring/integration-context.xml",
"classpath:META-INF/spring/integration-ws-context.xml"})
@RunWith(SpringJUnit4ClassRunner.class)
+@Ignore("The target WeatherWS is unreliable (INTSAMPLES-145), so uncomment if you'd like to test the real interaction")
public class TravelGatewayTest {
private static final Logger LOGGER = Logger.getLogger(TravelGatewayTest.class);