2
我想将我的xml配置转换为Java类配置,但我找不到解决方案。比如我的一块配置的:Spring-integration将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类。给我任何建议我寻找答案,但我找不到出路。
好吧,但我想使用注释。你可以给我任何建议如何使用注释相同的事情?因为我可以找到替代我的出站通道适配器的方式。 @ArtemBilan – djdecks8767
我现在解决我的问题。 – djdecks8767
出站通道适配器是一个'@ ServiceActivator'。请参阅相同的SFTP章节:http://docs.spring.io/spring-integration/reference/html/sftp.html#_configuring_with_java_configuration_19 –