类之间解耦
This commit is contained in:
@@ -20,12 +20,11 @@ import java.util.Date;
|
||||
public class Producer {
|
||||
|
||||
@Autowired
|
||||
@Output(MySource.OUTPUT)
|
||||
private MessageChannel channel;
|
||||
private MySource channel;
|
||||
|
||||
@RequestMapping("/send")
|
||||
public String send() {
|
||||
channel.send(MessageBuilder.withPayload(new Date()).build());
|
||||
channel.output().send(MessageBuilder.withPayload(new Date()).build());
|
||||
return "success";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
spring:
|
||||
rabbitmq:
|
||||
host: docker-1.fjy8018.cn
|
||||
host: 192.168.163.128
|
||||
username: cms
|
||||
password: cms-mq-admin
|
||||
cloud:
|
||||
|
||||
Reference in New Issue
Block a user