Groovy&Grails-代码剪辑-在控制台显示SQL

修改DataSource,增加下面两行代码


dataSource {
    pooled = true
    driverClassName = "com.mysql.jdbc.Driver"
    username = "root"
    password = "123456"

    logSql = true //在控制台显示SQL
    formatSql = true //格式化SQL
}

你可能感兴趣的:(Groovy&Grails-代码剪辑-在控制台显示SQL)