JdbcTemplate hJDBC = app.getInstance("hsql");
//3.初始化表
this.initData(mJDBC, hJDBC);
//
System.out.println("MySQL User Count :" + mJDBC.queryForInt("select count(*) from TB_User"));
System.out.println("HSQL User Count :" + hJDBC.queryForInt("select count(*) from TB_User"));
//
}
private void initData(JdbcTemplate mJDBC, JdbcTemplate hJDBC) throws SQLException, IOException {
String insertUser_1 = "insert into TB_User values(?,'默罕默德','muhammad','123','muhammad@hasor.net','2011-06-08 20:08:08');";
String insertUser_2 = "insert into TB_User values(?,'安妮.贝隆','belon','123','belon@hasor.net','2011-06-08 20:08:08');";