2012-03-28 41 views

回答

0

您可以在grails-app/conf/DataSource.groovy中为grails应用程序指定数据库(JDBC)设置。对于Postgres数据库,你会想是这样的:

dataSource { 
    pooled = true 
    driverClassName = "org.postgresql.Driver" 
    username = "user1258361" 
    password = "lmgtfy" 
    url = "jdbc:postgresql:user1258361" 

    // one of 'create', 'create-drop','update' 
    // if you don't know what this does, find out now!!! 
    dbCreate = "update" 
} 

你需要替换为您实际的数据库URL,用户名,密码,我上面

提供的虚拟值
相关问题