From 10a286d71db58521c8a4922c456a8fa720d5b470 Mon Sep 17 00:00:00 2001 From: snoop Date: Wed, 12 Apr 2017 11:49:14 +0900 Subject: [PATCH] first comiit --- .gitignore | 19 +++++++++ pom.xml | 21 ++++++++++ .../com/loafle/overflow/crawler/Crawler.java | 39 +++++++++++++++++++ src/main/resources/_ | 0 src/test/resources/logback.xml | 17 ++++++++ 5 files changed, 96 insertions(+) create mode 100644 .gitignore create mode 100644 pom.xml create mode 100644 src/main/java/com/loafle/overflow/crawler/Crawler.java create mode 100644 src/main/resources/_ create mode 100644 src/test/resources/logback.xml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8c79544 --- /dev/null +++ b/.gitignore @@ -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/ \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..ba6c891 --- /dev/null +++ b/pom.xml @@ -0,0 +1,21 @@ + + + 4.0.0 + + + com.loafle + maven_parent_jar + 1.0.0-RELEASE + + + com.loafle.overflow + crawler_java + jar + 1.0.0-SNAPSHOT + com.loafle.overflow.crawler_java + + + + \ No newline at end of file diff --git a/src/main/java/com/loafle/overflow/crawler/Crawler.java b/src/main/java/com/loafle/overflow/crawler/Crawler.java new file mode 100644 index 0000000..bd33fb1 --- /dev/null +++ b/src/main/java/com/loafle/overflow/crawler/Crawler.java @@ -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 params) throws Exception; + + public Map 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; + } + +} diff --git a/src/main/resources/_ b/src/main/resources/_ new file mode 100644 index 0000000..e69de29 diff --git a/src/test/resources/logback.xml b/src/test/resources/logback.xml new file mode 100644 index 0000000..b2974db --- /dev/null +++ b/src/test/resources/logback.xml @@ -0,0 +1,17 @@ + + + crawler_java + + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{32} - %msg%n + + + + + + + + + \ No newline at end of file