I have 2 datasources defined in my dataSource.groovy one is default
dataSource {
all variables
}
other one is readonly
dataSource_readonly {
all variables
}
Initially I used to use default datasource in my controller so:
class myController {
javax.sql.DataSource dataSource
def sql = new Sql(dataSource)
.............
so now to use the other datasource do I need to do something like this ?
class myController {
javax.sql.DataSource dataSource_readonly
def sql = new Sql(dataSource_readonly)
.............
Have you tried something like that: