1
我试图从jexl2移动到jexl3,我注意到它抛出异常开始于$的变量。它曾用于jexl2。问题是,我一直在广泛使用这个地方。
这个作品在jexl2
JexlContext jc = new MapContext();
jc.set("$a", "A00123");
jc.set("r", r);
Expression e = jexl.createExpression("r.header.mrn=$a");
但抛出这个在jexl3:
Exception in thread "main" org.apache.commons.jexl3.JexlException$Variable: undefined variable a
是否有解决方法或我没有移动到jexl3的方式吗?