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 –