コントロールバスを介してファイルインバウンドチャネルアダプタを起動しようとしていますが、ExpressionCommandMessageProcessorがコマンドを解析しようとしている間に例外が発生しています。私は制御バスBeanをautowiredしている私の統合テストでコントロールバス経由でインバウンドチャネルアダプタを起動するには?
@Bean(name = "inboundChannelAdapter")
public IntegrationFlow inputFilesReadingFlow()
{
return IntegrationFlows
.from(s -> s.file(new File(inputDirectory))
.filter(new AcceptAllFileListFilter<File>()),
e -> e.poller(Pollers.fixedDelay(FILE_POLLER_RATE))
.autoStartup(false)
)
.handle(messageProcessingService)
.channel(fileOutputChannel)
.get();
}
@Bean
public IntegrationFlow controlBusFlow()
{
return IntegrationFlows.from("controlBusChannel").controlBus().get();
}
:
@Autowired
private MessageChannel controlBusChannel;
@Test
public void testInboundChannelAdapter()
{
controlBusChannel.send(new GenericMessage<String>("@'inboundChannelAdapter.<property_name_placeholder>'.start()")); // ????
// .....
}
だから、私は「アダプターにアクセスする方法をお願いしたいと思います。ここ
は私のインバウンドチャネルアダプタの設定です'ポーンプロセスを開始するためのBean(または開始/停止アクションの責任を負うBean)。
ありがとうございます。
返信いただきありがとうございます。特定のIDを使用して解決することができました。また、私の質問への返信を待っている間、私のために働いたSourcePollingChannelAdapterもautowiring中にこの回答(http://stackoverflow.com/a/23916788/222002)を見つけました。 – Alex