dataSource {
pooled = true
driverClassName = "com.mysql.jdbc.Driver"
username = "root"
password = "mysql"
//logSql=true
}
hibernate {
cache.use_second_level_cache=true
cache.use_query_cache=true
cache.provider_class='com.opensymphony.oscache.hibernate.OSCacheProvider'
//cache.provider_class='org.hibernate.cache.EhCacheProvider'
}
// environment specific settings
environments {
development {
dataSource {
dbCreate = "update" // one of 'create', 'create-drop','update'
url = "jdbc:mysql://localhost:3306/GDepot_dev"
}
}
test {
dataSource {
dbCreate = "update"
url = "jdbc:mysql://localhost:3306/GDepot_test"
}
}
production {
dataSource {
dbCreate = "update"
url = "jdbc:mysql://localhost:3306/GDepot_dev"
}
}
}
grails框架 数据源 MySQL