public interface ScriptEvaluator
Aside from language-specific implementations, Spring also ships
a version based on the standard javax.script package (JSR-223):
StandardScriptEvaluator.
@Nullable Object evaluate(ScriptSource script) throws ScriptCompilationException
script - the ScriptSource for the script to evaluateScriptCompilationException - if the evaluator failed to read,
compile or evaluate the script@Nullable Object evaluate(ScriptSource script, @Nullable Map<String,Object> arguments) throws ScriptCompilationException
script - the ScriptSource for the script to evaluatearguments - the key-value pairs to expose to the script,
typically as script variables (may be null or empty)ScriptCompilationException - if the evaluator failed to read,
compile or evaluate the script