User Tools

Site Tools


java:evaluateexpressionsgivenasparameter

How to evaluate expressions given as parameter

Sometimes it comes in handy to evaluate an expression given as a parameter, to leave open certain parts of the application (how a particular formula is calculated, the set of business rules of the application, etc.). For this, the Spring Expression Parser comes to rescue. Here are two references I've used to implement my own case.

The documentation of Spring, despite is large, is good:

http://docs.spring.io/spring/docs/3.0.0.M3/reference/html/ch07s05.html

And here is a more concise explanation:

http://syntx.io/evaluating-expressions-using-spring-expression-language-spel/

java/evaluateexpressionsgivenasparameter.txt · Last modified: 2022/12/02 22:02 by 127.0.0.1