|
|
@ -13,14 +13,12 @@ public class JdbcUtilsTest { |
|
|
|
private JdbcUtils jdbcUtils=new JdbcUtils("com.mysql.jdbc.Driver","jdbc:mysql://localhost:3306/ssm?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8","root","mysql"); |
|
|
|
private JdbcUtils jdbcUtils=new JdbcUtils("com.mysql.jdbc.Driver","jdbc:mysql://localhost:3306/ssm?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8","root","mysql"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
|
|
public void getDBInfo() { |
|
|
|
public void getDBInfo() { |
|
|
|
|
|
|
|
|
|
|
|
DbInfo dbInfo = jdbcUtils.getDBInfo(); |
|
|
|
DbInfo dbInfo = jdbcUtils.getDBInfo(); |
|
|
|
System.out.println(dbInfo); |
|
|
|
System.out.println(dbInfo); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
|
|
public void getAllTable() { |
|
|
|
public void getAllTable() { |
|
|
|
List<Table> tableList = jdbcUtils.getAllTable(); |
|
|
|
List<Table> tableList = jdbcUtils.getAllTable(); |
|
|
|
tableList.forEach((table)->{ |
|
|
|
tableList.forEach((table)->{ |
|
|
|