when deploying grails app to cloudfoundry, if define multi-datasource ,there are error: Cannot create JDBC driver of class 'org.postgresql.Driver' for connect URL 'n/a'
dataSource {
dialect = "org.hibernate.dialect.MySQLInnoDBDialect"
driverClassName = 'com.mysql.jdbc.Driver'
username = 'n/a'
password = 'n/a'
url = 'n/a'
dbCreate = 'update'
}
dataSource_postgre {
dialect = "org.hibernate.dialect.PostgresPlusDialect"
driverClassName = "org.postgresql.Driver"
username = 'n/a'
password = 'n/a'
url = "n/a"
dbCreate = 'update'
}
but as i known from http://blog.springsource.com/2011/04/12/one-step-deployment-with-grails-and-cloud-foundry/ as following:
When you bind a service to an application in Cloud Foundry, you are telling the cloud to pass the connection settings for that service to the application at runtime. The Cloud Foundry plugin then picks up that information and overrides the connection settings in your application. As if by magic, your application then transparently works against the cloud service without you having done anything! And this works for all available services, not just MySQL