test
This commit is contained in:
parent
ceb03cfb6b
commit
e0f2de0565
74
.gitignore
vendored
Normal file
74
.gitignore
vendored
Normal file
|
@ -0,0 +1,74 @@
|
|||
# Created by .ignore support plugin (hsz.mobi)
|
||||
### Java template
|
||||
# Compiled class file
|
||||
*.class
|
||||
|
||||
# Log file
|
||||
*.log
|
||||
|
||||
# BlueJ files
|
||||
*.ctxt
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.ear
|
||||
*.zip
|
||||
*.tar.gz
|
||||
*.rar
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
### JetBrains template
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
|
||||
# User-specific stuff:
|
||||
.idea/**/workspace.xml
|
||||
.idea/**/tasks.xml
|
||||
.idea/dictionaries
|
||||
|
||||
# Sensitive or high-churn files:
|
||||
.idea/**/dataSources/
|
||||
.idea/**/dataSources.ids
|
||||
.idea/**/dataSources.xml
|
||||
.idea/**/dataSources.local.xml
|
||||
.idea/**/sqlDataSources.xml
|
||||
.idea/**/dynamic.xml
|
||||
.idea/**/uiDesigner.xml
|
||||
|
||||
# Gradle:
|
||||
.idea/**/gradle.xml
|
||||
.idea/**/libraries
|
||||
|
||||
# Mongo Explorer plugin:
|
||||
.idea/**/mongoSettings.xml
|
||||
|
||||
## File-based project format:
|
||||
*.iws
|
||||
|
||||
## Plugin-specific files:
|
||||
|
||||
# IntelliJ
|
||||
/out/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
fabric.properties
|
||||
|
||||
.gitignore
|
||||
.idea/
|
||||
crawler.sql.iml
|
||||
sql.iml
|
||||
target/
|
7
pom.xml
7
pom.xml
|
@ -11,10 +11,10 @@
|
|||
</parent>
|
||||
|
||||
<groupId>com.loafle.overflow</groupId>
|
||||
<artifactId>sql</artifactId>
|
||||
<artifactId>crawler.sql</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<name>com.loafle.overflow.sql</name>
|
||||
<name>com.loafle.overflow.crawler.sql</name>
|
||||
|
||||
<dependencies>
|
||||
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
|
||||
|
@ -31,7 +31,6 @@
|
|||
<version>42.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc -->
|
||||
<dependency>
|
||||
<groupId>com.microsoft.sqlserver</groupId>
|
||||
<artifactId>mssql-jdbc</artifactId>
|
||||
|
@ -47,7 +46,7 @@
|
|||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.loafle</groupId>
|
||||
<groupId>com.loafle.overflow</groupId>
|
||||
<artifactId>crawler_java</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package com.loafle.overflow.sql;
|
||||
package com.loafle.overflow.crawler.sql;
|
||||
|
||||
/**
|
||||
* Created by insanity on 17. 4. 11.
|
|
@ -1,4 +1,4 @@
|
|||
package com.loafle.overflow.sql;
|
||||
package com.loafle.overflow.crawler.sql;
|
||||
|
||||
import com.loafle.overflow.crawler.Crawler;
|
||||
|
||||
|
@ -15,8 +15,10 @@ public class SQLCrawler extends Crawler {
|
|||
|
||||
public SQLCrawler() {}
|
||||
|
||||
public Object get(String id) {
|
||||
TargetInfo info = getTargetInfo(id);
|
||||
|
||||
@Override
|
||||
protected Object getInternal(Map<String, Object> config) {
|
||||
TargetInfo info = getTargetInfo(config.get("id").toString());
|
||||
return getMetrics(info);
|
||||
}
|
||||
|
||||
|
@ -24,17 +26,17 @@ public class SQLCrawler extends Crawler {
|
|||
TargetInfo info = new TargetInfo();
|
||||
|
||||
// //MySQL
|
||||
info.setUrl("jdbc:mysql://192.168.1.215:3306");
|
||||
info.setId("root");
|
||||
info.setPw("qwe123");
|
||||
info.setSSL(false);
|
||||
info.setQuery("show session status");
|
||||
// //MSSQL
|
||||
// info.setUrl("jdbc:sqlserver://192.168.1.106:1433");
|
||||
// info.setId("sa");
|
||||
// info.setUrl("jdbc:mysql://192.168.1.215:3306"); // ?useSSL=true&verifyServerCertificate=false
|
||||
// info.setId("root");
|
||||
// info.setPw("qwe123");
|
||||
// info.setSSL(false);
|
||||
// info.setQuery("select * from master.dbo.sysprocesses");
|
||||
// info.setQuery("show session status");
|
||||
// //MSSQL
|
||||
info.setUrl("jdbc:sqlserver://192.168.1.103:1433;integratedSecurity=SSPI;encrypt=false;trustServerCertificate=true");
|
||||
info.setId("sa");
|
||||
info.setPw("qwer5795");
|
||||
info.setSSL(true);
|
||||
info.setQuery("select * from master.dbo.sysprocesses");
|
||||
// //PGSQL
|
||||
// info.setUrl("jdbc:postgresql://192.168.1.107:5432/postgres");
|
||||
// info.setId("postgres");
|
|
@ -1,4 +1,4 @@
|
|||
package com.loafle.overflow.sql;
|
||||
package com.loafle.overflow.crawler.sql;
|
||||
|
||||
/**
|
||||
* Created by insanity on 17. 4. 11.
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
package com.loafle.overflow;
|
||||
|
||||
import com.loafle.overflow.sql.SQLCrawler;
|
||||
import com.loafle.overflow.crawler.sql.SQLCrawler;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
|
Loading…
Reference in New Issue
Block a user