您将如何使用 spring 集成将文件从一个地方复制到另一个地方。就我而言,我想将战争之外的文件复制到战争内部。这是我正在考虑的代码片段:
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.springframework.org/schema/integration"
xmlns:file="http://www.springframework.org/schema/integration/file"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration-1.0.xsd
http://www.springframework.org/schema/integration/file http://www.springframework.org/schema/integration/file/spring-integration-file-1.0.xsd
http://www.springframework.org/schema/integration/mail http://www.springframework.org/schema/integration/mail/spring-integration-mail-1.0.xsd
">
<poller max-messages-per-poll="1" id="defaultPoller" default="true">
<interval-trigger interval="1000"/>
</poller>
<file:inbound-channel-adapter id="filesIn"
filename-pattern="ha-jdbc-cluster1.xml"
directory="file:/etc/****/" />
<file:outbound-channel-adapter id="filesOut" directory="classpath:/WEB-INF/classes" />
但可耻的是它不起作用。有人知道怎么做吗?
提前致谢 .....