如何在Grails 1.3.3中使用多个数据源

时间:2014-03-12 15:26:23

标签: grails datasource

我想在单一环境中使用两个数据源。

dataSource {
                dbCreate = "update" // one of 'create', 'create-drop','update'
                 pooled = true
                driverClassName = "com.mysql.jdbc.Driver"
                username = "root"
                password = "" 
                url = ""
                dialect = "org.hibernate.dialect.MySQL5InnoDBDialect"
                properties { 
                        maxActive = 75
                        maxIdle = 10
                        minIdle = 2
                        initialSize = 2
                        maxWait = 30000
                        validationQuery="select 1"
                        testOnBorrow=true
                        testWhileIdle=true
                        timeBetweenEvictionRunsMillis=60000
                    } 
            }

1 个答案:

答案 0 :(得分:2)

在Grails 2.0之前,Datasources plugin提供了多个数据源支持。