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