📜  测试spring cloud stream - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:02.001000             🧑  作者: Mango

代码示例1
@SpringBootApplication
@EnableBinding(Sink.class)
public class JdbcSink {

  @Bean
  @ServiceActivator(inputChannel = Sink.INPUT)
  public MessageHandler logHandler(DataSource dataSource) {
     return new JdbcMessageHandler(dataSource,
                                 "INSERT INTO foobar (value) VALUES (:payload)");
  }
}Copy