h2数据库

2020-11-07  本文已影响0人  宋song一

1. java 操作

添加依赖:
testCompile group: 'com.h2database', name: 'h2', version: '1.4.197'

 Connection conn = DriverManager.getConnection("jdbc:h2:D:/aa/test", "sa", "");
 Connection conn = DriverManager.
       getConnection("jdbc:h2:tcp://localhost/D:/aa/test", "sa", "");
   Connection conn = DriverManager.
       getConnection("jdbc:h2:tcp://localhost/mem:test2", "sa", "");
上一篇下一篇

猜你喜欢

热点阅读