Spring Integration を使用して、ファイルのディレクトリをポーリングし、このファイルをサービス クラスで処理し、このファイルを出力ディレクトリに書き込み、元のファイルを削除します。
次の XML 構成があります。
<int-file:inbound-channel-adapter id="filesInChannel"
directory="file:${java.io.tmpdir}/input"
auto-create-directory="true" >
<int:poller id="poller" fixed-delay="1000" />
</int-file:inbound-channel-adapter>
<int:service-activator id="servicActivator"
input-channel="filesInChannel"
output-channel="filesOut"
ref="my_file_processing_service">
</int:service-activator>
<int-file:outbound-channel-adapter id="filesOut" auto-create-directory="true" delete-source-files="true" directory="file:${java.io.tmpdir}/output"/>
これにより、ファイルがポーリングされ、それが my processing_service に渡され、outbound ディレクトリにコピーされます。ただし、元のファイルは削除されていません。誰もが理由について何か考えがありますか?