我想将我的 xml 配置转换为 Java 类配置,但我找不到解决方案。例如我的一段配置:
<file:inbound-channel-adapter id="filesIn" directory="file:${java.io.tmpdir}/spring-integration-samples/input"
filename-regex="^.*\.(xml|json)$" >
<int:poller id="poller" fixed-delay="5000"/>
</file:inbound-channel-adapter>
<int:service-activator input-channel="filesIn"
output-channel="filesOut"
ref="handler"/>
<file:outbound-channel-adapter id="filesOut" directory="file:${java.io.tmpdir}/spring-integration-samples/output"
delete-source-files="true"/>
<file:inbound-channel-adapter id="filesContent" directory="file:${java.io.tmpdir}/spring-integration-samples/output"
filename-regex="^.*\.(xml|json)$" prevent-duplicates="true">
<int:poller id="poller2" fixed-delay="5000"/>
</file:inbound-channel-adapter>
我怎样才能做同样的事情,但在我的本地机器上使用 sftp(src 目录)以及如何在 java 类中编写这个配置。给我任何建议,我正在寻找答案,但我找不到出路。