From 701197029ff86266e0d623b6054a3dbdd691fa80 Mon Sep 17 00:00:00 2001 From: yiweiran <168578203@qq.com> Date: Fri, 21 May 2021 19:13:18 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E5=A2=9E=E5=8A=A0=E4=BA=86=E4=B8=BB?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E5=92=8C=E5=86=92=E7=83=9F=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=EF=BC=8C=E6=96=87=E6=A1=A3=E5=A2=9E=E5=8A=A0=E4=BA=86=E5=BF=83?= =?UTF-8?q?=E5=BE=97=E9=83=A8=E5=88=86=EF=BC=81=EF=BC=81=EF=BC=81"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 61b22195162ec24fbbf2ef020485bb0a524c82b9. --- README.md | 23 +++-------------- pom.xml | 6 ----- src/main/java/com/github/weiranyi/Main.java | 25 ------------------- .../java/com/github/weiranyi/SmokeTest.java | 10 -------- 4 files changed, 3 insertions(+), 61 deletions(-) delete mode 100644 src/main/java/com/github/weiranyi/Main.java delete mode 100644 src/test/java/com/github/weiranyi/SmokeTest.java diff --git a/README.md b/README.md index e0b41b9..bf28e34 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # 项目:多线程爬虫与Elasticsearch搜索引擎实战 *** -## 一、前言部分:做一个项目的原则 +## 1、前言部分:做一个项目的原则 - 心法: - 1、把每个项目当作人生最好的项目来精雕细琢,一丝不苟滴写好文档,保证代码质量(以自己当前最高水平去完成,可以借助代码检测工具) - 2、使用业界标准化的模式和流程,每一行代码都不要是多余的(如:不要提交不该提交的文件 .idea 等不要上传到Github);几乎不要有本地依赖,使用者能够毫无障碍的使用 @@ -31,25 +31,8 @@ - 单线程 -> 多线程 - console -> H2 -> MySQL - database -> Elasticsearch -- 好的代码习惯: - - 不要写妥协的代码 - - 有好的三方实现可以借用,如:Apache提供的包 *** -## 二、项目概述: -- 1、项目目标:爬取新浪网 -- 2、现阶段使用了: - -## 心得: -- 冒烟测试;测试原则:每个测试是一个类,负责一个小的功能模块 -- git命令回顾: - - 撤销 git add 操作,可以使用以下命令: - ```shell - git restore --staged src/main/java/com/github/weiranyi/Main.java - ``` - - 若此时全部commit提交,想要撤销一个提交怎么办 - ```shell - git reset HEAD~1 - ``` -- +## 2、前言部分: + diff --git a/pom.xml b/pom.xml index 3158adb..44fa054 100644 --- a/pom.xml +++ b/pom.xml @@ -52,12 +52,6 @@ - - - org.apache.httpcomponents - httpclient - 4.5.13 - org.junit.jupiter junit-jupiter-api diff --git a/src/main/java/com/github/weiranyi/Main.java b/src/main/java/com/github/weiranyi/Main.java deleted file mode 100644 index 93be3f3..0000000 --- a/src/main/java/com/github/weiranyi/Main.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.github.weiranyi; - -import org.apache.http.HttpEntity; -import org.apache.http.client.methods.CloseableHttpResponse; -import org.apache.http.client.methods.HttpGet; -import org.apache.http.impl.client.CloseableHttpClient; -import org.apache.http.impl.client.HttpClients; -import org.apache.http.util.EntityUtils; - -import java.io.IOException; - -public class Main { - public static void main(String[] args) throws IOException { - try (CloseableHttpClient httpclient = HttpClients.createDefault()) { - HttpGet httpGet = new HttpGet("https://sina.cn/"); - try (CloseableHttpResponse response1 = httpclient.execute(httpGet)) { - System.out.println(response1.getStatusLine()); - HttpEntity entity1 = response1.getEntity(); - // do something useful with the response body - // and ensure it is fully consumed - System.out.println(EntityUtils.toString(entity1)); - } - } - } -} diff --git a/src/test/java/com/github/weiranyi/SmokeTest.java b/src/test/java/com/github/weiranyi/SmokeTest.java deleted file mode 100644 index 4f9e38f..0000000 --- a/src/test/java/com/github/weiranyi/SmokeTest.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.github.weiranyi; - -import org.junit.jupiter.api.Test; - -public class SmokeTest { - @Test - public void test(){ - - } -} -- GitLab