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?
}
? ? }