定义别名
This commit is contained in:
@@ -7,13 +7,16 @@ spring:
|
|||||||
cloud:
|
cloud:
|
||||||
stream:
|
stream:
|
||||||
bindings:
|
bindings:
|
||||||
sink1-in-0:
|
send1:
|
||||||
destination: test2
|
destination: test2
|
||||||
sink2-in-0:
|
send2:
|
||||||
destination: test3
|
destination: test3
|
||||||
function:
|
function:
|
||||||
definition: sink1;sink2
|
# 定义别名
|
||||||
|
bindings:
|
||||||
|
sink1-in-0: send1
|
||||||
|
sink2-in-0: send2
|
||||||
|
definition: sink1;sink2
|
||||||
|
|
||||||
server:
|
server:
|
||||||
port: 8081
|
port: 8081
|
||||||
@@ -21,13 +21,13 @@ public class Producer {
|
|||||||
|
|
||||||
@RequestMapping("/send1")
|
@RequestMapping("/send1")
|
||||||
public String send1() {
|
public String send1() {
|
||||||
streamBridge.send("source1-out-0", new Date());
|
streamBridge.send("send1", new Date());
|
||||||
return "success1";
|
return "success1";
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping("/send2")
|
@RequestMapping("/send2")
|
||||||
public String send2() {
|
public String send2() {
|
||||||
streamBridge.send("source2-out-0", LocalDateTime.now().format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));
|
streamBridge.send("send2", LocalDateTime.now().format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));
|
||||||
return "success2";
|
return "success2";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,12 +7,16 @@ spring:
|
|||||||
cloud:
|
cloud:
|
||||||
stream:
|
stream:
|
||||||
bindings:
|
bindings:
|
||||||
source1-out-0:
|
send1:
|
||||||
destination: test2
|
destination: test2
|
||||||
source2-out-0:
|
send2:
|
||||||
destination: test3
|
destination: test3
|
||||||
function:
|
function:
|
||||||
definition: source1;source2
|
# 定义别名
|
||||||
|
bindings:
|
||||||
|
source1-in-0: send1
|
||||||
|
source2-in-0: send2
|
||||||
|
definition: source1;source2
|
||||||
|
|
||||||
|
|
||||||
server:
|
server:
|
||||||
|
|||||||
Reference in New Issue
Block a user