"123456"; final String MYSQL_URL="jdbc:mysql://localhost:3306/test";// 数据库连接的url try{ Class.forName(MYSQL_DRIVER); return DriverManager.getConnection(MYSQL_URL, MYSQL_USERNAME, MYSQL_PASSWORD); }catch(Exception e){ e.printStackTrace(); } return null; } public void testQuery() throws SQLException{ Connection conn=null; CallableStatement cstmt=null; ResultSet rs=null; try{ conn=this.getConnection(); cstmt =conn.prepareCall("{call queryPro()}"); rs=cstmt.executeQuery(); while(rs.next()){ System.out.println("id:"+rs.getInt(1)+"||name:"+rs.getString( |