删除spring集成的源文件

删除spring集成的源文件,spring,spring-integration,Spring,Spring Integration,我有一个spring集成文件,使用入站适配器从本地目录读取一些文件,然后将其存储在couchdb中。最后我想删除它。在我的属性文件中,我使用delete.source.files=true。然而,这似乎不起作用。我在其他stackflow问题中读到,我可以使用ExpressionEvaluationRequestHandlerAdvice。我将它与我的inboundchanneladapter一起使用,但它不起作用 <file:inbound-channel-adapter id="fil

我有一个spring集成文件,使用入站适配器从本地目录读取一些文件,然后将其存储在couchdb中。最后我想删除它。在我的属性文件中,我使用delete.source.files=true。然而,这似乎不起作用。我在其他stackflow问题中读到,我可以使用ExpressionEvaluationRequestHandlerAdvice。我将它与我的inboundchanneladapter一起使用,但它不起作用

<file:inbound-channel-adapter id="filesInput" expression= "headers['file_originalFile'].delete()?null:null"
        directory="file:${incoming.path}/${tw.instance}" queue-size="8"
        filename-pattern="*.json" prevent-duplicates="true" channel="filesIn"  >
        <int:poller id="poller" fixed-rate="${file.read.interval.millis}"
            task-executor="pollerExecutor" />
    </file:inbound-channel-adapter>


还有其他方法删除它吗?这个表达有什么问题。我不熟悉spring集成。提前感谢。

首先,
上没有
表达式
选项。另一种情况是,该组件实际上没有任何删除文件的选项。由于该组件完全基于
java.io.File
对象,因此没有理由引入任何删除功能,因为简单的
File.delete()
在任何下游位置都足够了


是的,
expressionevaluation-requesthandleradvice
可以用于此问题,但作为该couchdb操作的
上的
。它的
onSuccessExpression
选项可用于执行
File.delete()

我的问题是有三个出站通道适配器在哪里使用?