一些类,在前面的博客中有,就不重复了 public class Test2 { TestDAO t=new TestDAO(); /*前提是数据表的主键是自动增加的, *取得数据库自动生成的主键 * */ @Test public void testGetKeyValues() throws Exception{ Connection connection=null; PreparedStatement preparedStatement=null; try { String sql="inse…