gpt4 book ai didi

mule - Mule MEL中$的解释

转载 作者:行者123 更新时间:2023-12-01 05:50:14 25 4
gpt4 key购买 nike

除了几行 here,我找不到任何关于在 MEL 中使用 $ 的文档

You can refer to any Java class by its fully qualified name or if it is one of the classes in the automatically-imported Java classes, by its unqualified name. References use the same dot notation as in Java, except that you must use $ rather than a dot to refer to a nested class.

我可以找到几个例子 here

JSON processing MEL has no direct support for JSON. The json-to-object-transformer can turn a JSON payload into a hierarchy of simple data structures that are easily parsed with MEL. For example, the following uses a filtered projection to build the equivalent of the

$..[?
(@.title=='Moby Dick')].price JSON path expression:
<json:json-to-object-transformer returnClass="java.lang.Object" />
<expression-transformer
expression="#[($.price in message.payload if $.title == 'Moby Dick')[0]]" />

我想了解在哪些情况下会使用 $...

最佳答案

$ 来自 MVEL,MEL 的底层语言。

$ serves as the placeholder for the element being filtered. It is actually a regular variable that exists inside the context of the projection. You can also use it to return the current element in the projection to the representative list.

引用:http://mvel.codehaus.org/MVEL+2.0+Projections+and+Folds#MVEL2.0ProjectionsandFolds-Filters

关于mule - Mule MEL中$的解释,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30112612/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com