param map => Config
This commit is contained in:
parent
0d414b3b8f
commit
ec8ba81cb8
|
@ -38,19 +38,19 @@ public class AppTest {
|
||||||
@Test
|
@Test
|
||||||
@Ignore
|
@Ignore
|
||||||
public void testSQL() {
|
public void testSQL() {
|
||||||
SQLCrawler sc = new SQLCrawler();
|
// SQLCrawler sc = new SQLCrawler();
|
||||||
Map config = new HashMap();
|
// Map config = new HashMap();
|
||||||
config.put("url", "jdbc:mysql://192.168.1.215:3306");
|
// config.put("url", "jdbc:mysql://192.168.1.215:3306");
|
||||||
config.put("user", "root");
|
// config.put("user", "root");
|
||||||
config.put("pw", "qwe123");
|
// config.put("pw", "qwe123");
|
||||||
config.put("ssl", false);
|
// config.put("ssl", false);
|
||||||
config.put("query", "show session status");
|
// config.put("query", "show session status");
|
||||||
|
//
|
||||||
Object result = sc.getInternal(config);
|
// Object result = sc.getInternal(config);
|
||||||
for(Map<String, String> m : (List<Map<String,String>>)result) {
|
// for(Map<String, String> m : (List<Map<String,String>>)result) {
|
||||||
for (Map.Entry<String, String> entry : m.entrySet()) {
|
// for (Map.Entry<String, String> entry : m.entrySet()) {
|
||||||
System.out.println("Key = " + entry.getKey() + ", Value = " + entry.getValue());
|
// System.out.println("Key = " + entry.getKey() + ", Value = " + entry.getValue());
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user