Grails and PostgreSQL

来自开放百科 - 灰狐
2011年5月30日 (一) 08:50Allen (讨论 | 贡献)的版本

(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转到: 导航, 搜索

Grails 支持 PostgreSQL

grails-app\conf\DataSource.groovy

dataSource {
	pooled = true
	driverClassName = "org.postgresql.Driver"
	username = "postgres"
	password = "postgres"
}
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" // one of 'create', 'create-drop','update'
			url = "jdbc:postgresql://localhost:5432/regperfdb"
		}
	}
	test {
 		dataSource {
			dbCreate = "update"
			url = "jdbc:postgresql://localhost:5432/regperfdb"
		}
	}
	production {
		dataSource {
			dbCreate = "update"
			url = "jdbc:postgresql://localhost:5432/regperfdb"
}}}

lib\postgresql-8.3dev-600.jdbc4

分享您的观点
个人工具
名字空间

变换
操作
导航
工具箱