如何在 Mule 文件读取中给出相对路径?

How to give Relative Path in Mule File Read?

您好,我创建了一个文件夹并在 src/main/resources/samplexml/samplxml.xml 中放置了一个示例 XML 文件。 文件配置我做了

<file:config name="File_Config" doc:name="File Config">
    <file:connection workingDir="${app.home}" />
</file:config>

在文件读取操作中我将其配置为

<file:read doc:name="Read" config-ref="File_Config" path="/samplexml/samplxml.xml"/>

但是当 运行 应用程序出现错误时

Message               : Path '/samplexml/samplxml.xml' doesn't exist
Error type            : FILE:ILLEGAL_PATH

给出相对路径的正确方法是什么?

尝试删除 'Read' 操作中的标题斜线 'Path' 属性:

<file:read doc:name="Read" config-ref="File_Config" path="samplexml/samplxml.xml"/>