- GroovyShell shell = new GroovyShell();
- Script script = shell.parse(new File(SCRIPT_FILE));
- script.setProperty("score1", score1);
- script.setProperty("score2", score2);
- Object ret = script.run();
- //该片段来自于http://www.codesnippet.cn/detail/190320132481.html
来源: http://www.codesnippet.cn/detail/190320132481.html