Unfortunately, you need to configure the dataSource spring bean for yourself if you want more control over it. This can be done by specifying a bean in "grails-app / conf / spring / resources.groovy"
beans = {
dataSource(org.apache.commons.dbcp.BasicDataSource) {
driverClassName = "com.mysql.jdbc.Driver"
username = "someuser"
password = "s3cret"
initialSize = 15
maxActive = 50
maxIdle = 15
}
}
It will override the default Grails data file, which is configured in "grails-app / conf / DataSource.groovy".
, , grails. DataSource.groovy, , PropertyOverrideConfigurer ( Config.groovy):
beans = {
dataSource.initialSize = 15
dataSource.maxActive = 50
dataSource.maxIdle = 15
}