Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 MUnit 模拟消息处理器中,我们如何在带有消息负载字段的返回中指定非特定负载,例如 Mule 消息集合(逗号分隔的 XML 数据)。
一般来说,如果我们只是对值进行硬编码,它将被视为一个字符串,这使得进一步阅读变得困难。
我们如何将数据类型指定为 Mule Message Collection ?
这个你能帮我吗 。
提前致谢。
使用 MEL 表达式创建集合。根据您的示例,一个逗号分隔的字符串列表,您可以将 MEL 与任何 Java/MVEL 操作一起使用以从中创建一个列表:
<mock:then-return payload="#[Arrays.asList(('${mycommaseparatedlistofstrings}'.split(',')))]" />