← Back to list

greenplum 使用jdbc连接数据库

Published on: | Views: 110

下载驱动

greenplum 6.0 jdbc driver download 将jar导入到项目中, gradle可以这样子

compile fileTree(dir: 'libs', include: '*.jar')

配置数据源

spring.datasource.driver-class-name=com.pivotal.jdbc.GreenplumDriver
spring.datasource.url=jdbc:pivotal:greenplum://192.168.1.10:5432;DatabaseName=test_db
spring.datasource.username=xxx
spring.datasource.password=xxxxxx

image.png

参考:https://gpdb.docs.pivotal.io/6-0/datadirect/datadirect_jdbc.html

测试发现这个驱动有些不足: 1. getObject没有实现 2. 不支持LocalDataTime类型

最后项目还是采用了标准的postgresql驱动