我正在使用 sts 开发一个 grails 2.0.3 应用程序。我开发并在关闭 sts 之前,我通常将我的应用程序部署在 cloudFoundry 上。我正在使用 HSQLDB,这是 DataSource.groovy:
dataSource {
pooled = true
driverClassName = "org.h2.Driver"
username = "mcg"
password = "mcg"
}
hibernate {
cache.use_second_level_cache = true
cache.use_query_cache = true
cache.provider_class = 'net.sf.ehcache.hibernate.EhCacheProvider'
}
// environment specific settings
environments {
development {
dataSource {
dbCreate = "update" // one of 'create', 'create-drop','update'
url = "jdbc:h2:file:qhDB"
}
}
test {
dataSource {
dbCreate = "update"
url = "jdbc:h2:file:testDb"
}
}
production {
dataSource {
dbCreate = "update"
url = "jdbc:h2:file:prodDb"
}
}
}
我的问题是,每次我将应用程序部署到 cloudfoundry 时,云上的数据库都会变空。
一些建议?