test spring cloud stream code example
Example: test spring cloud stream
@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