diff --git a/hutool-http/src/main/java/org/dromara/hutool/http/client/ClientEngine.java b/hutool-http/src/main/java/org/dromara/hutool/http/client/engine/ClientEngine.java similarity index 86% rename from hutool-http/src/main/java/org/dromara/hutool/http/client/ClientEngine.java rename to hutool-http/src/main/java/org/dromara/hutool/http/client/engine/ClientEngine.java index 885974f69..90e5c686a 100644 --- a/hutool-http/src/main/java/org/dromara/hutool/http/client/ClientEngine.java +++ b/hutool-http/src/main/java/org/dromara/hutool/http/client/engine/ClientEngine.java @@ -10,7 +10,11 @@ * See the Mulan PSL v2 for more details. */ -package org.dromara.hutool.http.client; +package org.dromara.hutool.http.client.engine; + +import org.dromara.hutool.http.client.ClientConfig; +import org.dromara.hutool.http.client.Request; +import org.dromara.hutool.http.client.Response; import java.io.Closeable; diff --git a/hutool-http/src/main/java/org/dromara/hutool/http/client/engine/ClientEngineFactory.java b/hutool-http/src/main/java/org/dromara/hutool/http/client/engine/ClientEngineFactory.java index b512c4a81..8ecf80fd7 100644 --- a/hutool-http/src/main/java/org/dromara/hutool/http/client/engine/ClientEngineFactory.java +++ b/hutool-http/src/main/java/org/dromara/hutool/http/client/engine/ClientEngineFactory.java @@ -17,7 +17,6 @@ import org.dromara.hutool.core.spi.SpiUtil; import org.dromara.hutool.core.text.StrUtil; import org.dromara.hutool.http.HttpException; import org.dromara.hutool.http.client.ClientConfig; -import org.dromara.hutool.http.client.ClientEngine; import org.dromara.hutool.log.StaticLog; /** diff --git a/hutool-http/src/main/java/org/dromara/hutool/http/client/engine/httpclient4/HttpClient4Engine.java b/hutool-http/src/main/java/org/dromara/hutool/http/client/engine/httpclient4/HttpClient4Engine.java index faedc87a0..fc88e39f1 100644 --- a/hutool-http/src/main/java/org/dromara/hutool/http/client/engine/httpclient4/HttpClient4Engine.java +++ b/hutool-http/src/main/java/org/dromara/hutool/http/client/engine/httpclient4/HttpClient4Engine.java @@ -31,7 +31,7 @@ import org.dromara.hutool.core.net.url.UrlBuilder; import org.dromara.hutool.http.GlobalHeaders; import org.dromara.hutool.http.HttpException; import org.dromara.hutool.http.client.ClientConfig; -import org.dromara.hutool.http.client.ClientEngine; +import org.dromara.hutool.http.client.engine.ClientEngine; import org.dromara.hutool.http.client.Request; import org.dromara.hutool.http.client.Response; import org.dromara.hutool.http.client.body.HttpBody; diff --git a/hutool-http/src/main/java/org/dromara/hutool/http/client/engine/httpclient5/HttpClient5Engine.java b/hutool-http/src/main/java/org/dromara/hutool/http/client/engine/httpclient5/HttpClient5Engine.java index 904823e18..b62cc6fce 100644 --- a/hutool-http/src/main/java/org/dromara/hutool/http/client/engine/httpclient5/HttpClient5Engine.java +++ b/hutool-http/src/main/java/org/dromara/hutool/http/client/engine/httpclient5/HttpClient5Engine.java @@ -35,7 +35,7 @@ import org.dromara.hutool.core.net.url.UrlBuilder; import org.dromara.hutool.http.GlobalHeaders; import org.dromara.hutool.http.HttpException; import org.dromara.hutool.http.client.ClientConfig; -import org.dromara.hutool.http.client.ClientEngine; +import org.dromara.hutool.http.client.engine.ClientEngine; import org.dromara.hutool.http.client.Request; import org.dromara.hutool.http.client.Response; import org.dromara.hutool.http.client.body.HttpBody; diff --git a/hutool-http/src/main/java/org/dromara/hutool/http/client/engine/jdk/JdkClientEngine.java b/hutool-http/src/main/java/org/dromara/hutool/http/client/engine/jdk/JdkClientEngine.java index 56797517b..5cfe1d090 100644 --- a/hutool-http/src/main/java/org/dromara/hutool/http/client/engine/jdk/JdkClientEngine.java +++ b/hutool-http/src/main/java/org/dromara/hutool/http/client/engine/jdk/JdkClientEngine.java @@ -19,7 +19,7 @@ import org.dromara.hutool.core.util.ObjUtil; import org.dromara.hutool.http.HttpException; import org.dromara.hutool.http.HttpUtil; import org.dromara.hutool.http.client.ClientConfig; -import org.dromara.hutool.http.client.ClientEngine; +import org.dromara.hutool.http.client.engine.ClientEngine; import org.dromara.hutool.http.client.Request; import org.dromara.hutool.http.client.Response; import org.dromara.hutool.http.client.body.HttpBody; diff --git a/hutool-http/src/main/java/org/dromara/hutool/http/client/engine/okhttp/OkHttpEngine.java b/hutool-http/src/main/java/org/dromara/hutool/http/client/engine/okhttp/OkHttpEngine.java index 592518484..d3c05c56d 100644 --- a/hutool-http/src/main/java/org/dromara/hutool/http/client/engine/okhttp/OkHttpEngine.java +++ b/hutool-http/src/main/java/org/dromara/hutool/http/client/engine/okhttp/OkHttpEngine.java @@ -16,7 +16,7 @@ import okhttp3.OkHttpClient; import okhttp3.internal.http.HttpMethod; import org.dromara.hutool.core.io.IORuntimeException; import org.dromara.hutool.http.client.ClientConfig; -import org.dromara.hutool.http.client.ClientEngine; +import org.dromara.hutool.http.client.engine.ClientEngine; import org.dromara.hutool.http.client.Request; import org.dromara.hutool.http.client.Response; import org.dromara.hutool.http.proxy.HttpProxy; diff --git a/hutool-http/src/main/java/org/dromara/hutool/http/html/HtmlUtil.java b/hutool-http/src/main/java/org/dromara/hutool/http/html/HtmlUtil.java index 5b6bbb363..53cdfb6d4 100644 --- a/hutool-http/src/main/java/org/dromara/hutool/http/html/HtmlUtil.java +++ b/hutool-http/src/main/java/org/dromara/hutool/http/html/HtmlUtil.java @@ -27,7 +27,6 @@ import java.util.regex.Pattern; * HTML工具类 * *
- * 比如我们在使用爬虫爬取HTML页面后,需要对返回页面的HTML内容做一定处理,
* 比如去掉指定标签(例如广告栏等)、去除JS、去掉样式等等,这些操作都可以使用此工具类完成。
*
* @author xiaoleilu
diff --git a/hutool-http/src/main/resources/META-INF/services/org.dromara.hutool.http.client.ClientEngine b/hutool-http/src/main/resources/META-INF/services/org.dromara.hutool.http.client.engine.ClientEngine
similarity index 100%
rename from hutool-http/src/main/resources/META-INF/services/org.dromara.hutool.http.client.ClientEngine
rename to hutool-http/src/main/resources/META-INF/services/org.dromara.hutool.http.client.engine.ClientEngine
diff --git a/hutool-http/src/test/java/org/dromara/hutool/http/client/ClientEngineFactoryTest.java b/hutool-http/src/test/java/org/dromara/hutool/http/client/ClientEngineFactoryTest.java
index 00bb301cb..f2ae2725f 100644
--- a/hutool-http/src/test/java/org/dromara/hutool/http/client/ClientEngineFactoryTest.java
+++ b/hutool-http/src/test/java/org/dromara/hutool/http/client/ClientEngineFactoryTest.java
@@ -1,5 +1,6 @@
package org.dromara.hutool.http.client;
+import org.dromara.hutool.http.client.engine.ClientEngine;
import org.dromara.hutool.http.client.engine.ClientEngineFactory;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
diff --git a/hutool-http/src/test/java/org/dromara/hutool/http/client/HttpClient4EngineTest.java b/hutool-http/src/test/java/org/dromara/hutool/http/client/HttpClient4EngineTest.java
index d46517fe0..0be66e29f 100644
--- a/hutool-http/src/test/java/org/dromara/hutool/http/client/HttpClient4EngineTest.java
+++ b/hutool-http/src/test/java/org/dromara/hutool/http/client/HttpClient4EngineTest.java
@@ -1,6 +1,7 @@
package org.dromara.hutool.http.client;
import org.dromara.hutool.core.lang.Console;
+import org.dromara.hutool.http.client.engine.ClientEngine;
import org.dromara.hutool.http.client.engine.httpclient4.HttpClient4Engine;
import org.dromara.hutool.http.meta.Method;
import org.junit.jupiter.api.Disabled;
diff --git a/hutool-http/src/test/java/org/dromara/hutool/http/client/HttpClient5EngineTest.java b/hutool-http/src/test/java/org/dromara/hutool/http/client/HttpClient5EngineTest.java
index cae911475..065b4cb3f 100644
--- a/hutool-http/src/test/java/org/dromara/hutool/http/client/HttpClient5EngineTest.java
+++ b/hutool-http/src/test/java/org/dromara/hutool/http/client/HttpClient5EngineTest.java
@@ -1,6 +1,7 @@
package org.dromara.hutool.http.client;
import org.dromara.hutool.core.lang.Console;
+import org.dromara.hutool.http.client.engine.ClientEngine;
import org.dromara.hutool.http.client.engine.httpclient5.HttpClient5Engine;
import org.dromara.hutool.http.meta.Method;
import org.junit.jupiter.api.Disabled;
diff --git a/hutool-http/src/test/java/org/dromara/hutool/http/client/JdkEngineTest.java b/hutool-http/src/test/java/org/dromara/hutool/http/client/JdkEngineTest.java
index e7b134002..1378efa5e 100644
--- a/hutool-http/src/test/java/org/dromara/hutool/http/client/JdkEngineTest.java
+++ b/hutool-http/src/test/java/org/dromara/hutool/http/client/JdkEngineTest.java
@@ -1,6 +1,7 @@
package org.dromara.hutool.http.client;
import org.dromara.hutool.core.lang.Console;
+import org.dromara.hutool.http.client.engine.ClientEngine;
import org.dromara.hutool.http.client.engine.jdk.JdkClientEngine;
import org.dromara.hutool.http.meta.Method;
import org.junit.jupiter.api.Disabled;
diff --git a/hutool-http/src/test/java/org/dromara/hutool/http/client/OkHttpEngineTest.java b/hutool-http/src/test/java/org/dromara/hutool/http/client/OkHttpEngineTest.java
index b7641abe3..914955dbd 100644
--- a/hutool-http/src/test/java/org/dromara/hutool/http/client/OkHttpEngineTest.java
+++ b/hutool-http/src/test/java/org/dromara/hutool/http/client/OkHttpEngineTest.java
@@ -1,6 +1,7 @@
package org.dromara.hutool.http.client;
import org.dromara.hutool.core.lang.Console;
+import org.dromara.hutool.http.client.engine.ClientEngine;
import org.dromara.hutool.http.client.engine.okhttp.OkHttpEngine;
import org.dromara.hutool.http.meta.Method;
import org.junit.jupiter.api.Disabled;