首页 软件开发 代码片段 groovy ( Page 3 )

groovy 77

#Groovy
在Groovy中调用Groovy脚本

package com.test println a b = a * 2 c = { -> println a * 3 }

2015-12-14 484

#Groovy
groovy实现的简易tree命令

path = "." as File if (args) { path = args[0] as File } printDir path,0 def printDir(File …

2015-12-14 666

#Groovy
用 Gretty 编写一个简单的 HTTP 服务器【Groovy版】

/* * Copyright 2009-2010 MBTE Sweden AB. * * Licensed under the Apache License, Version 2.…

2015-12-14 234

#Groovy
grails导出excel

/** * 构建excel * @param block 闭包,封装构建逻辑 */ def build(dataList,titleList,out,Closure block){…

2015-12-14 1,015

#Groovy
Top n 动态查询

def bjSectionInstance = BjSection.get(params.id) if (!bjSectionInstance) { flash.message =…

2015-12-14 764

#Groovy
在 Gwitter 中添加 File 菜单

import groovy.swing.SwingBuilder import javax.swing.* import java.awt.* class Gwitter{ sta…

2015-12-14 181

#Groovy
grails 发送邮件

首先在buildConfig中的plugins { compile ":mail:1.0.1" } 然后再config中配置 grails.mail.default.from = …

2015-12-14 701

#Groovy
groovy加水印

// cf. http://kyle-in-jp.blogspot.com/2008/08/java2d.html // cf. http://d.hatena.ne.jp/tos…

2015-12-14 245

#Groovy
Groovy 构建和解析 XML

<langs type="current"> <language>Java</language> <language>Groovy&…

2015-12-14 706

#Groovy
Groovy 监控 HttpClient 上传进度

/** * A utility that contains all of the client functionality needed to perform the upload…

2015-12-14 943

#Groovy
groovy使用SwingBuilder构建swing

import groovy.swing.SwingBuilder import javax.swing.* def swingBuilder = new SwingBuilder(…

2015-12-14 154

#Groovy
xfire服务器的注解开发及客户端的调用

服务器端: @WebService(name="Test",serviceName="Test", targetNamespace="http://www.oksonic.cn/x…

2015-12-14 779