Taught the FTP adapter how to do file name filtering and predicates INT-1357
This commit is contained in:
@@ -1,14 +1,10 @@
|
||||
package org.springframework.integration.ftp;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
import org.springframework.integration.Message;
|
||||
import org.springframework.integration.annotation.ServiceActivator;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
|
||||
|
||||
@@ -13,10 +13,15 @@
|
||||
location="file://${user.home}/Desktop/ftp.properties"
|
||||
ignore-unresolvable="true"/>
|
||||
|
||||
<bean class="org.springframework.integration.ftp.PatternMatchingFTPFileListFilter" id="patternMatchingFTPFileListFilter">
|
||||
<property name="patternExpression" value=".*?jpg"/>
|
||||
</bean>
|
||||
|
||||
<ftp:inbound-channel-adapter remote-directory="${ftp.remotedir}" channel="ftpIn" auto-create-directories="true"
|
||||
host="${ftp.host}" auto-delete-remote-files-on-sync="false"
|
||||
username="${ftp.username}" password="${ftp.password}" port="2222"
|
||||
client-mode="passive-local-data-connection-mode"
|
||||
username="${ftp.username}" password="${ftp.password}" port="2222"
|
||||
client-mode="passive-local-data-connection-mode"
|
||||
filename-pattern=".*?jpg"
|
||||
>
|
||||
<int:poller>
|
||||
<int:interval-trigger interval="10000" time-unit="MILLISECONDS"/>
|
||||
@@ -30,4 +35,4 @@
|
||||
|
||||
<int:service-activator input-channel="ftpIn" ref="inboundFTPFileServiceActivator"/>
|
||||
|
||||
</beans>
|
||||
</beans>
|
||||
|
||||
Reference in New Issue
Block a user