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

groovy 77

#Groovy
微信SHA1验证

String token = "QDG6eK"; String timeStamp = "1409659589"; String nonce = "263014780"; Stri…

2015-12-14 949

#Groovy
Groovy @Log 的用法

import groovy.util.logging.* import java.util.logging.Level @Log("log2") class Car { Car()…

2015-12-14 535

#Groovy
grails配置jndi数据源

dataSource { jndiName = "java:comp/env/jdbc/lugua" //或 jndiName = "jdbc/lugua" 视你的jee容器jnd…

2015-12-14 912

#Groovy
Groovy用inject方法构造Map

def a = [1, 2, 3] def b = [4, 5, 6] def m = [:] [a, b].transpose().each { k, v -> m += …

2015-12-14 887

#Groovy
扫描端口小工具

package org.sl.util /** * Created by shanl on 14-3-18. */ class ScanPort implements Runnab…

2015-12-14 218

#Groovy
Grails 文件上传

<g:form action="save" method="post" enctype="multipart/form-data"> <input type="f…

2015-12-14 984

#Groovy
groovy 方式 写的qt时钟代码

/** * */ package com.suziwen import com.trolltech.qt.core.QPoint import com.trolltech.qt.c…

2015-12-14 518

#Groovy
grails默认全局gorm配置

//默认实体约束 grails.gorm.default.constraints = { '*'(nullable:true, blank:true) } //默认映射 grail…

2015-12-14 424

#Groovy
Groovy实现Ruby的case .. when表达式

def match(subject, closure) { def whenMap = [:], otherwise = null closure.when = { map -&g…

2015-12-14 359

#Groovy
使用groovy插件保存ci的状态文件

/** * @author petert * @since V1.0 * To save all logs into file if status is not success *…

2015-12-14 377

#Groovy
groovy grails 动态方法一例

//定义一个类 class GlobalService{ def grailsApplication def propertyMissing(String name){ grail…

2015-12-14 252

#Groovy
处理二进制文件

//---------------------------------------------------------------------------------- // Ja…

2015-12-14 368