Hsqldb在Memory-Only模式下方便发布项目

<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>2.3.2</version>
</dependency>

 

try {
Class.forName("org.hsqldb.jdbcDriver" );
} catch (Exception e) {
System.out.println("ERROR: failed to load HSQLDB JDBC driver.");
e.printStackTrace();
return;
}

Connection c = DriverManager.getConnection("jdbc:hsqldb:mem:dbname", "sa", ""); 

 Class.forName("org.hsqldb.jdbcDriver").newInstance(); 

posted @ 2014-02-20 11:41  堂哥  阅读(370)  评论(0编辑  收藏  举报