Created
April 14, 2021 07:41
-
-
Save artem-smotrakov/0b2619b967c331d1135f791f3d701c87 to your computer and use it in GitHub Desktop.
Example of evaluating an expression with JUEL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Object evaluate(String expression) { | |
ExpressionFactory factory = new de.odysseus.el.ExpressionFactoryImpl(); | |
ELContext context = new de.odysseus.el.util.SimpleContext(); | |
ValueExpression e = factory.createValueExpression(context, expression, Object.class); | |
return e.getValue(context); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment