【问题标题】:How to give Relative Path in Mule File Read?如何在 Mule 文件读取中给出相对路径?
【发布时间】:2021-07-18 03:36:26
【问题描述】:

您好,我创建了一个文件夹并在 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

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

【问题讨论】:

    标签: dataweave mule4


    【解决方案1】:

    尝试删除“读取”操作“路径”属性中的标题斜线:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-07-27
      • 2017-10-31
      • 1970-01-01
      • 2013-11-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-20
      相关资源
      最近更新 更多