简体   繁体   中英

Spring Integration File Polling complex structure - subdirectories

I am currently using this project as an attempt to listen and poll files from a FS structure, start Spring Batch jobs from them and write'em back to a different folder.

Unfortunately, as I can guess, it can only define one single folder for each type of channel (read, out, fail and processed). I would like to define a parent folder for each channel and a few children folders to be automatically created and have a scanner on.

Eg:

entrada:
    path: /opt/app/inbound/
    informantes:
        - Bradesco
        - Itau
        - Caixa
        - Banco do Brasil
        - Santander

Do you guys have any hint on if and how can this be achieved?

I've seen this link here , but I couldn't figure it out how to adapt it to this solution.

Any help is highly appreciated!

Best regards, Enrico

Did you see a RecursiveDirectoryScanner there in Spring Integration?

 * The {@link DefaultDirectoryScanner} extension which walks through the directory tree
 * using {@link Files#walk(Path, int, FileVisitOption...)}.
 * <p>
 * By default this class visits all levels of the file tree without any {@link FileVisitOption}s.

What files to accept or not you can determine by particular filter , eg RegexPatternFileListFilter .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM