有没有人与Postgres一起工作?我使用这个
tutorial,一切似乎都是有道理的,对我来说是正确的。但是当我’grails run-app’我得到这个错误
原文链接:https://www.f2er.com/postgresql/193226.htmlCannot create JDBC driver of class 'org.postgresql.Driver' for connect URL 'jdbc:postgres://10.0.0.21/tribes' java.sql.sqlException: No suitable driver
我的DataSource文件是
dataSource { pooled = true driverClassName = "org.postgresql.Driver" dialect = org.hibernate.dialect.PostgresqlDialect } hibernate { cache.use_second_level_cache=true cache.use_query_cache=true cache.provider_class='com.opensymphony.oscache.hibernate.OSCacheProvider' } // environment specific settings environments { development { dataSource { dbCreate = "update" url = "jdbc:postgres://10.0.0.21:5432/tribes" username = "grails" password = "grails" } } test { dataSource { dbCreate = "update" url = "jdbc:postgres://10.0.0.21:5432/tribes" username = "grails" password = "grails" } } production { dataSource { dbCreate = "update" url = "jdbc:postgres://10.0.0.21:5432/tribes" username = "grails" password = "grails" } } }