first comiit
This commit is contained in:
commit
10a286d71d
19
.gitignore
vendored
Normal file
19
.gitignore
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
# Created by .ignore support plugin (hsz.mobi)
|
||||
### Java template
|
||||
*.class
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.ear
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
|
||||
|
||||
*.iml
|
||||
target/
|
||||
.idea/
|
21
pom.xml
Normal file
21
pom.xml
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>com.loafle</groupId>
|
||||
<artifactId>maven_parent_jar</artifactId>
|
||||
<version>1.0.0-RELEASE</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.loafle.overflow</groupId>
|
||||
<artifactId>crawler_java</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<name>com.loafle.overflow.crawler_java</name>
|
||||
|
||||
|
||||
|
||||
</project>
|
39
src/main/java/com/loafle/overflow/crawler/Crawler.java
Normal file
39
src/main/java/com/loafle/overflow/crawler/Crawler.java
Normal file
|
@ -0,0 +1,39 @@
|
|||
package com.loafle.overflow.crawler;
|
||||
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 4. 10.
|
||||
*/
|
||||
public abstract class Crawler {
|
||||
|
||||
public Object add(String id) throws Exception {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public Object get(String id) throws Exception {
|
||||
|
||||
return getInternal(getConfig(id));
|
||||
|
||||
}
|
||||
|
||||
protected abstract Object getInternal(Map<String, Object> params) throws Exception;
|
||||
|
||||
public Map<String,Object> getConfig(String id) throws Exception {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public Object init(String config) throws Exception {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public Object remove(String id) throws Exception {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
0
src/main/resources/_
Normal file
0
src/main/resources/_
Normal file
17
src/test/resources/logback.xml
Normal file
17
src/test/resources/logback.xml
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration scan="true" scanPeriod="3 seconds">
|
||||
<contextName>crawler_java</contextName>
|
||||
<!-- TRACE > DEBUG > INFO > WARN > ERROR -->
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>
|
||||
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{32} - %msg%n
|
||||
</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<root level="DEBUG">
|
||||
<appender-ref ref="STDOUT" />
|
||||
</root>
|
||||
<logger name="com.loafle" level="ALL" />
|
||||
</configuration>
|
Loading…
Reference in New Issue
Block a user