在 Java 中执行 Groovy 代码,javagroovy,GroovyShell
分享于 点击 93 次 点评:154
在 Java 中执行 Groovy 代码,javagroovy,GroovyShell
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://byrx.net
用户点评