我找不到如何在 Grails 中激活连接池。
在我的 DataSource.groovy 中,我有以下内容:
url = "jdbc:mysql://localhost/myapp?useUnicode=yes&characterEncoding=UTF-8"
username = "root"
password = ""
dialect = org.hibernate.dialect.MySQL5InnoDBDialect
pooled = true
properties {
maxActive = -1
minEvictableIdleTimeMillis=1800000
timeBetweenEvictionRunsMillis=1800000
numTestsPerEvictionRun=3
testOnBorrow=true
testWhileIdle=true
testOnReturn=true
validationQuery = "select 1"
}
除了设置 pooled = true 之外,我还需要做些什么来激活连接池吗?