Set autoStartup to false on the TimeSource

Prevents the endpoint from starting before it's bound, thus throwing Dispatcher errors
This commit is contained in:
Marius Bogoevici
2015-08-14 15:23:06 -04:00
parent 690f69420f
commit 76eb34256e

View File

@@ -42,7 +42,7 @@ public class TimeSource {
private TimeSourceOptionsMetadata options;
@Bean
@InboundChannelAdapter(value = Source.OUTPUT, poller = @Poller(fixedDelay = "${fixedDelay}", maxMessagesPerPoll = "1"))
@InboundChannelAdapter(value = Source.OUTPUT, autoStartup = "false", poller = @Poller(fixedDelay = "${fixedDelay}", maxMessagesPerPoll = "1"))
public MessageSource<String> timerMessageSource() {
return () -> new GenericMessage<>(new SimpleDateFormat(this.options.getFormat()).format(new Date()));
}