Mule MEL中$的解释
Explanation of $ in Mule MEL
除了几行 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
除了几行 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