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

groovy 77

#Groovy
groovy基本mysql查询代码

package com.hongyuan.db import groovy.sql.Sql class DB { static main(args) { //创建查询对象 def …

2015-12-14 125

#Groovy
grails 通过applicationContext获取bean

class ShopService{ def grailsApplication def test(){ grailsApplication.mainContext.getBean…

2015-12-14 977

#Groovy
Groovy计算个人所得税。

def salary=7200; def tax=0.00; //只定义到了第5档,这个已经很难达到了 def taxRateMap=[3500:0.03,5000:0.1,800…

2015-12-14 916

#Groovy
groovy 关键字 in 判断集合包含的用法

def list = [1,2,3,4] println (1 in list)// print true

2015-12-14 669

#Groovy
grooy随机生成合法身份证号码的脚本

def rand = new Random() def w = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2] def …

2015-12-14 454
1 5 6 7