mirror of
https://github.com/wahyd4/spring-cloud-stream-samples.git
synced 2026-08-09 05:16:18 +10:00
Update sample to use aggregate-app-builder
This commit is contained in:
committed by
Marius Bogoevici
parent
9a3c5e863d
commit
f1653abf09
+5
-8
@@ -23,14 +23,6 @@
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-stream</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-stream-binder-redis</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-redis</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
@@ -42,6 +34,11 @@
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-stream-binder-redis</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package demo;
|
||||
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.stream.aggregate.AggregateApplication;
|
||||
import org.springframework.cloud.stream.aggregate.AggregateApplicationBuilder;
|
||||
|
||||
import config.sink.SinkApplication;
|
||||
import config.source.SourceApplication;
|
||||
@@ -26,7 +26,9 @@ import config.source.SourceApplication;
|
||||
public class DoubleApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
AggregateApplication.run(SourceApplication.class, SinkApplication.class);
|
||||
new AggregateApplicationBuilder().
|
||||
from(SourceApplication.class).args("--fixedDelay=5000")
|
||||
.to(SinkApplication.class).args("--debug=true").run("--spring.application.name=aggregate-test");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user