Skip to content

Wasp JDBC

axlfu edited this page Sep 28, 2013 · 5 revisions

系统提供了JDBC的方式访问SQL。
例子:
首先准备配置文件wasp-conf.properties
示例配置如下:
wasp.zookeeper.quorum=10.232.98.31
wasp.zookeeper.property.clientPort=2181

启动JDBC代码示例:

Properties properties = util.getConf("/wasp-conf.properties");
com.alibaba.wasp.jdbc.Driver.load();
conn = DriverManager.getConnection("jdbc:wasp:", properties);
stat = conn.createStatement();
Clone this wiki locally