首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 开源软件 >

groovy 动态施行script文档汇总

2012-07-16 
groovy 动态执行script文档汇总对于有些需求不用动态脚本来做就特别麻烦,故有了groovy之后,能在线写代码然

groovy 动态执行script文档汇总

对于有些需求不用动态脚本来做就特别麻烦,故有了groovy之后,能在线写代码然后执行再修改这种感觉很好,之前有使用过groovy。这次再重新写个轮子来满足需求,特此将一些文档记录在此

?

?

Embedding Groovy (官方文档)

http://groovy.codehaus.org/Embedding+Groovy

?

?

?

Groovy Goodness: Add Imports Transparently to Scripts with ImportCustomizer(一系列的关于groovy的tips)

http://mrhaki.blogspot.com/2011/06/groovy-goodness-add-imports.html

?

?

对于实现自己的groovy动态脚本执行器的人要注意一点,需要将编译后的class或者scripe缓存起来防止每次都重新创建。

?

对于一些外部类引用需要使用全限定名的方式或者使用import功能,例如我上面第2个链接

1 楼 RednaxelaFX 2011-12-23   啊,这个ImportCustomizer不错。之前我只做过很弱的自动import:http://rednaxelafx.iteye.com/blog/891917 2 楼 dikar 2011-12-23   RednaxelaFX 写道啊,这个ImportCustomizer不错。之前我只做过很弱的自动import:http://rednaxelafx.iteye.com/blog/891917

这么好的功能,之前不知道为啥没引入,mvel很早就支持了

热点排行