속성이 false
으로 설정된 인바운드 파일 채널 어댑터가 있습니다. 이 어댑터는 내 응용 프로그램의 시작점입니다. 시스템에 파일을 알리는 메시지를 보내지 않으면 다른 모든 것이 불활성이 될 것으로 기대합니다.스프링 통합 - 자동 시작 제어
그러나 내 컨텍스트를 시작하면 메시지가 시스템을 통해 흐르기 시작합니다. 왜?
구성 :
<int-file:inbound-channel-adapter auto-startup="false" id="fileWatcher" directory="${input.dir}" channel="incomingFiles">
<int:poller fixed-rate="1000"></int:poller>
</int-file:inbound-channel-adapter>
<int:channel id="incomingFiles"></int:channel>
홈페이지 방법 :
public static void main(String[] args) {
logger.info("Started application");
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("classpath:/spring-config/*.xml");
context.start();
}
로그 :
[...]
12:06:56.743 [main] INFO o.s.i.e.SourcePollingChannelAdapter - started fileWatcher
12:06:56.770 [task-scheduler-6] INFO o.s.i.file.FileReadingMessageSource - Created message: [[Payload=C:\input\From Spreadsheet.txt][Headers={timestamp=1343214416770, id=b8e92486-d469-406e-8787-df78e23b287a}]]
감사합니다. Gary! 콩을 암시 적으로 '시작'하기에 충분하다는 것을 깨닫지 못했습니다. –