【发布时间】:2014-07-30 20:02:29
【问题描述】:
我正在使用 Spring Integration 从 FTP 服务器检索文件(使用 SFTP)。 我的问题是 FTP 服务器上的文件名包含重音字符('é'、'à' 等)。找到的文件没有问题,但是一旦传输完成,重音就会被其他字符替换,例如“?”。 我想知道... Spring Integration 中是否有我遗漏的配置?
顺便说一句,FTP服务器和应用服务器都在Linux Ubuntu下。
这是我的 Spring 集成配置:
<beans:bean id="sftpSessionFactory"
class="org.springframework.integration.sftp.session.DefaultSftpSessionFactory">
<beans:property name="host" value="${sftp.host}" />
<beans:property name="port" value="${sftp.port}" />
<beans:property name="user" value="${sftp.user}" />
<beans:property name="password" value="${sftp.password}" />
</beans:bean>
<sftp:inbound-channel-adapter id="sftpInboundAdapter"
channel="sftpReceiveChannel" session-factory="sftpSessionFactory"
local-directory="file:${files.path}/input"
remote-directory="${sftp.remote.dir}" auto-create-local-directory="true"
delete-remote-files="true" filename-regex=".*\.xlsx$">
<poller fixed-rate="10000" max-messages-per-poll="1" />
</sftp:inbound-channel-adapter>
【问题讨论】:
标签: java encoding ftp sftp spring-integration