I am quite new to MVEL. What I am trying to achieve is to log input and outputs of every function in an expression.
For example, having the following expression
h.function1('value1') != h.function2('value2')
what I am trying to log is the input and output values of function1
and function2
. I read about Interceptors. If I do undestand right, to add and interceptor I need to rewrite the above expression as the following.
@Intercept h.function1('value1') != @Intercept h.function2('value2')
However, I cannot force my users to add the @Intercept
annotation.
Which is the best way to accomplish this task? Have I to resume Spring AOP? :(