Я много осмотрелся, это моя конфигурация, как я могу динамически менять поллерон?Например, когда приложение запущено, и я изменяю cron поллера в БД, он должен быть выбран Poller в InboundChannelAdapter.
Примечание: я не использую конфигурацию Spring Cloud, поэтому @RefreshScope недействительно вариант
@Bean
@InboundChannelAdapter(channel = "sftpStreamChannel", poller = @Poller(cron = "${pollerCron}", maxMessagesPerPoll = "-1"))
public MessageSource<InputStream> sftpMessageSource()
{
SftpStreamingMessageSource source = new SftpStreamingMessageSource(template());
source.setRemoteDirectory(sftpRemoteDirectory);
source.setFilter(abSftpFileFilter());
return source;
}