first comiit

This commit is contained in:
snoop 2017-04-12 11:49:14 +09:00
commit 10a286d71d
5 changed files with 96 additions and 0 deletions

19
.gitignore vendored Normal file
View 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
View 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>

View 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
View File

View 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>