当我使用grails 2.1.1时
我用它来配置jndi数据源
在config.groovy
中 grails.naming.entries = [
"jdbc/notifDS": [
auth: "Container",
type: "javax.sql.DataSource",
maxActive: "50",
maxIdle: "25",
minIdle: "5",
initialSize: "5",
maxWait: "10000",
validationQuery: "SELECT 1",
timeBetweenEvictionRunsMillis: "60000",
minEvictableIdleTimeMillis: "60000",
username: "root",
password: "root",
driverClassName: "com.mysql.jdbc.Driver",
url: "jdbc:mysql://localhost:3306/notif?autoReconnect=true"
]
和datasource.groovy
dataSource {
dbCreate = "update"
jndiName = "java:comp/env/jdbc/testJNDIDataSource"
dialect = "org.hibernate.dialect.MySQL5InnoDBDialect"
}
在grails 3.x.x中怎么样?