Grails and PostgreSQL

来自开放百科 - 灰狐
跳转到: 导航, 搜索

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

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

变换
操作
导航
工具箱