`
wufei1310
  • 浏览: 21785 次
  • 性别: Icon_minigender_1
  • 来自: 合肥
社区版块
存档分类
最新评论

grails 直接使用sql

 
阅读更多

package test.sql

 

import groovy.sql.Sql

 

class SQLTestService {

 

def dataSource

 

    def sqlRun() {

def db = new Sql(dataSource)

db.eachRow('select * from house'){ 

println it 

}

    }

}

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics