grails执行sql,调用存储过程

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

import groovy.sql.Sql

class TestService{

def dataSource//注入数据源

def execute(){
    def db = new Sql(dataSource)
    db.rows('select * from user')
    db.eachRow('select * from user'){ println it }
    db.rows('call stp_select_user()')
}

}