Add Stream processing example
This commit is contained in:
@@ -16,14 +16,14 @@ import org.springframework.integration.support.MessageBuilder;
|
||||
@SpringBootApplication
|
||||
public class TimeSourceApplication {
|
||||
|
||||
@Bean
|
||||
@InboundChannelAdapter(value = Source.OUTPUT, poller = @Poller(fixedDelay = "10000", maxMessagesPerPoll = "1"))
|
||||
public MessageSource<Long> timeMessageSource() {
|
||||
@Bean
|
||||
@InboundChannelAdapter(value = Source.OUTPUT, poller = @Poller(fixedDelay = "10000", maxMessagesPerPoll = "1"))
|
||||
public MessageSource<Long> timeMessageSource() {
|
||||
|
||||
return () -> MessageBuilder.withPayload(new Date().getTime()).build();
|
||||
}
|
||||
return () -> MessageBuilder.withPayload(new Date().getTime()).build();
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(TimeSourceApplication.class, args);
|
||||
}
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(TimeSourceApplication.class, args);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,8 +9,8 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
@SpringBootTest
|
||||
public class TimeSourceApplicationTests {
|
||||
|
||||
@Test
|
||||
public void contextLoads() {
|
||||
}
|
||||
@Test
|
||||
public void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user