import groovy.json.JsonSlurperdef response = messageExchange.response.responseContentlog.info "response : "+ responsedef slurper = new JsonSlurper().....
分类:
Web程序 时间:
2015-06-18 13:01:41
阅读次数:
144
1.配置email插件,在Config.groovy文件中配置:plugins { compile ":mail:1.0.5" }2.配置Config.groovy文件:grails { mail { host = "smtp.163.com" //发送邮...
分类:
其他好文 时间:
2015-06-18 00:36:43
阅读次数:
208
Car c= new Car(log);c.print()class Car{ def log public Car(log){ this.log=log } public void print(){ log.info "hello world" }}
分类:
其他好文 时间:
2015-06-17 13:18:14
阅读次数:
105
Groovy控制台 Groovy编译:groovyc filename.groovy Groovy运行:groovy filename Groovy控制台:groovyConsole 默认导入 groovy.lang.* groovy.util.* java.lang.* java.io.* jav...
分类:
其他好文 时间:
2015-06-16 21:07:03
阅读次数:
285
Reading Properties file :Properties prop = new Properties()def path = "D:\\SoapUIStudy\\application.properties"FileInputStream fs = new FileInputStrea...
分类:
其他好文 时间:
2015-06-16 16:40:35
阅读次数:
101
def x="I like to read books before bed"def temp = x.split(" ")log.info "Size of array is : "+temp.lengthlog.info temp[0]log.info temp[1]log.info x.sub...
分类:
其他好文 时间:
2015-06-16 16:37:45
阅读次数:
122
Array:def x = new String[5]x[0] = "India"x[1] = "USA"x[2] = "Korea"x[3] = "Japan"x[4] = "China"log.info "Size of list is " + x.size()log.info "The fir...
分类:
其他好文 时间:
2015-06-16 16:26:08
阅读次数:
133
Hash:HashSet set = new HashSet()set.add("India")set.add("USA")set.add("China")log.info "Set size is : " + set.size()set.add("China")log.info "Set size...
分类:
其他好文 时间:
2015-06-16 16:08:36
阅读次数:
883
一、介绍Groovy是可以运行在 Java 平台上进行动态语言,使用方式基本与使用 Java 的方式相同,Groovy和java基本是可以实现无缝整合,它有以下一些特性:是一个基于Java虚拟机的敏捷动态语言。构建在强大的Java语言之上并添加了从Python,Ruby和Smalltalk等语言中学...
分类:
其他好文 时间:
2015-06-14 18:09:41
阅读次数:
124
列表(list): ? ? ? ? Groovy中的列表和Java的数组相似,如: def numbers = [1, 2, 3, 4] ? ? ? ? Groovy列表使用索引操作符[]来表示元素值,[]是List类的getAt方法的重载,用法和字符索引获取子字符串...
分类:
其他好文 时间:
2015-06-13 21:45:22
阅读次数:
173