更新环境变量: source /etc/profile 验证是否成功: # groovy -version Groovy Version: 2.3.6 JVM: 1.7.0_67 Vendor: Oracle Corporation OS: Linux 打开groovyConsole: 4).使用IDE进行开发(这里以Intellij idea 13.1为例) 1. Enable the plugin Before you create your first Groovy application…
本章将继续深入Groovy语言,首先学习Groovy脚本,包括从命令行编译和运行Groovy脚本,Groovy Shell,和Groovy Console.你将学会使用Groovy语言来建立域对象.控制器和服务.而且使用Groovy的方法并非只有一种.另外,对于建立类,可以使用Groovy作为脚本语言.例1:简单的Groovy脚本Hello.groovyprintln "Hello ${args[0]}, may Groovy be with you."执行以上代码:PS D:\tmp…