diff --git a/fine-spring/readme.md b/fine-spring/readme.md index 4e69f76db..31b9858ac 100644 --- a/fine-spring/readme.md +++ b/fine-spring/readme.md @@ -2,4 +2,6 @@ 2 fine-spring内容见https://kms.fineres.com/pages/viewpage.action?pageId=152798513
3 定制内容处均有"// 定制"注释
4 去除对jackson的ObjectMapper的支持:DEC-17331
-5、删除com.fr.third.springframework.remoting.caucho ;com.fr.third.springframework.remoting.httpinvoker; com.fr.third.springframework.remoting.rmi.*
\ No newline at end of file +5 删除com.fr.third.springframework.remoting.caucho ;com.fr.third.springframework.remoting.httpinvoker; com.fr.third.springframework.remoting.rmi.*
+6 HttpComponentsClientHttpRequestFactory里对httpclient的引用也需要修改包名,FDL用到了 +7 HttpComponentsAsyncClientHttpRequest等附近3个类用到了httpasyncclient这个库(这个库后来合入了http-components 5.0),但因为这几个类没有地方用,所以httpasyncclient我们也暂时没有引入 diff --git a/fine-spring/src/main/java/com/fr/third/springframework/http/client/HttpComponentsAsyncClientHttpRequest.java b/fine-spring/src/main/java/com/fr/third/springframework/http/client/HttpComponentsAsyncClientHttpRequest.java index 730df1863..b96340e45 100644 --- a/fine-spring/src/main/java/com/fr/third/springframework/http/client/HttpComponentsAsyncClientHttpRequest.java +++ b/fine-spring/src/main/java/com/fr/third/springframework/http/client/HttpComponentsAsyncClientHttpRequest.java @@ -20,14 +20,14 @@ import java.io.IOException; import java.net.URI; import java.util.concurrent.Future; -import org.apache.http.HttpEntity; -import org.apache.http.HttpEntityEnclosingRequest; -import org.apache.http.HttpResponse; -import org.apache.http.client.methods.HttpUriRequest; -import org.apache.http.concurrent.FutureCallback; -import org.apache.http.nio.client.HttpAsyncClient; -import org.apache.http.nio.entity.NByteArrayEntity; -import org.apache.http.protocol.HttpContext; +import com.fr.third.org.apache.http.HttpEntity; +import com.fr.third.org.apache.http.HttpEntityEnclosingRequest; +import com.fr.third.org.apache.http.HttpResponse; +import com.fr.third.org.apache.http.client.methods.HttpUriRequest; +import com.fr.third.org.apache.http.concurrent.FutureCallback; +import com.fr.third.org.apache.http.nio.client.HttpAsyncClient; +import com.fr.third.org.apache.http.nio.entity.NByteArrayEntity; +import com.fr.third.org.apache.http.protocol.HttpContext; import com.fr.third.springframework.http.HttpHeaders; import com.fr.third.springframework.http.HttpMethod; diff --git a/fine-spring/src/main/java/com/fr/third/springframework/http/client/HttpComponentsAsyncClientHttpRequestFactory.java b/fine-spring/src/main/java/com/fr/third/springframework/http/client/HttpComponentsAsyncClientHttpRequestFactory.java index ecbf3a81f..8bab09fba 100644 --- a/fine-spring/src/main/java/com/fr/third/springframework/http/client/HttpComponentsAsyncClientHttpRequestFactory.java +++ b/fine-spring/src/main/java/com/fr/third/springframework/http/client/HttpComponentsAsyncClientHttpRequestFactory.java @@ -20,16 +20,16 @@ import java.io.Closeable; import java.io.IOException; import java.net.URI; -import org.apache.http.client.HttpClient; -import org.apache.http.client.config.RequestConfig; -import org.apache.http.client.methods.Configurable; -import org.apache.http.client.methods.HttpUriRequest; -import org.apache.http.client.protocol.HttpClientContext; -import org.apache.http.impl.client.CloseableHttpClient; -import org.apache.http.impl.nio.client.CloseableHttpAsyncClient; -import org.apache.http.impl.nio.client.HttpAsyncClients; -import org.apache.http.nio.client.HttpAsyncClient; -import org.apache.http.protocol.HttpContext; +import com.fr.third.org.apache.http.client.HttpClient; +import com.fr.third.org.apache.http.client.config.RequestConfig; +import com.fr.third.org.apache.http.client.methods.Configurable; +import com.fr.third.org.apache.http.client.methods.HttpUriRequest; +import com.fr.third.org.apache.http.client.protocol.HttpClientContext; +import com.fr.third.org.apache.http.impl.client.CloseableHttpClient; +import com.fr.third.org.apache.http.impl.nio.client.CloseableHttpAsyncClient; +import com.fr.third.org.apache.http.impl.nio.client.HttpAsyncClients; +import com.fr.third.org.apache.http.nio.client.HttpAsyncClient; +import com.fr.third.org.apache.http.protocol.HttpContext; import com.fr.third.springframework.beans.factory.InitializingBean; import com.fr.third.springframework.http.HttpMethod; diff --git a/fine-spring/src/main/java/com/fr/third/springframework/http/client/HttpComponentsAsyncClientHttpResponse.java b/fine-spring/src/main/java/com/fr/third/springframework/http/client/HttpComponentsAsyncClientHttpResponse.java index b4849b56b..de8304577 100644 --- a/fine-spring/src/main/java/com/fr/third/springframework/http/client/HttpComponentsAsyncClientHttpResponse.java +++ b/fine-spring/src/main/java/com/fr/third/springframework/http/client/HttpComponentsAsyncClientHttpResponse.java @@ -19,9 +19,9 @@ package com.fr.third.springframework.http.client; import java.io.IOException; import java.io.InputStream; -import org.apache.http.Header; -import org.apache.http.HttpEntity; -import org.apache.http.HttpResponse; +import com.fr.third.org.apache.http.Header; +import com.fr.third.org.apache.http.HttpEntity; +import com.fr.third.org.apache.http.HttpResponse; import com.fr.third.springframework.http.HttpHeaders; import com.fr.third.springframework.util.StreamUtils; diff --git a/fine-spring/src/main/java/com/fr/third/springframework/http/client/HttpComponentsClientHttpRequest.java b/fine-spring/src/main/java/com/fr/third/springframework/http/client/HttpComponentsClientHttpRequest.java index 378f459b5..778fba7d1 100644 --- a/fine-spring/src/main/java/com/fr/third/springframework/http/client/HttpComponentsClientHttpRequest.java +++ b/fine-spring/src/main/java/com/fr/third/springframework/http/client/HttpComponentsClientHttpRequest.java @@ -21,14 +21,14 @@ import java.net.URI; import java.util.List; import java.util.Map; -import org.apache.http.HttpEntity; -import org.apache.http.HttpEntityEnclosingRequest; -import org.apache.http.HttpResponse; -import org.apache.http.client.HttpClient; -import org.apache.http.client.methods.HttpUriRequest; -import org.apache.http.entity.ByteArrayEntity; -import org.apache.http.protocol.HTTP; -import org.apache.http.protocol.HttpContext; +import com.fr.third.org.apache.http.HttpEntity; +import com.fr.third.org.apache.http.HttpEntityEnclosingRequest; +import com.fr.third.org.apache.http.HttpResponse; +import com.fr.third.org.apache.http.client.HttpClient; +import com.fr.third.org.apache.http.client.methods.HttpUriRequest; +import com.fr.third.org.apache.http.entity.ByteArrayEntity; +import com.fr.third.org.apache.http.protocol.HTTP; +import com.fr.third.org.apache.http.protocol.HttpContext; import com.fr.third.springframework.http.HttpHeaders; import com.fr.third.springframework.http.HttpMethod; diff --git a/fine-spring/src/main/java/com/fr/third/springframework/http/client/HttpComponentsClientHttpRequestFactory.java b/fine-spring/src/main/java/com/fr/third/springframework/http/client/HttpComponentsClientHttpRequestFactory.java index b9287bce5..af4253359 100644 --- a/fine-spring/src/main/java/com/fr/third/springframework/http/client/HttpComponentsClientHttpRequestFactory.java +++ b/fine-spring/src/main/java/com/fr/third/springframework/http/client/HttpComponentsClientHttpRequestFactory.java @@ -20,21 +20,21 @@ import java.io.Closeable; import java.io.IOException; import java.net.URI; -import org.apache.http.client.HttpClient; -import org.apache.http.client.config.RequestConfig; -import org.apache.http.client.methods.Configurable; -import org.apache.http.client.methods.HttpEntityEnclosingRequestBase; -import org.apache.http.client.methods.HttpGet; -import org.apache.http.client.methods.HttpHead; -import org.apache.http.client.methods.HttpOptions; -import org.apache.http.client.methods.HttpPatch; -import org.apache.http.client.methods.HttpPost; -import org.apache.http.client.methods.HttpPut; -import org.apache.http.client.methods.HttpTrace; -import org.apache.http.client.methods.HttpUriRequest; -import org.apache.http.client.protocol.HttpClientContext; -import org.apache.http.impl.client.HttpClients; -import org.apache.http.protocol.HttpContext; +import com.fr.third.org.apache.http.client.HttpClient; +import com.fr.third.org.apache.http.client.config.RequestConfig; +import com.fr.third.org.apache.http.client.methods.Configurable; +import com.fr.third.org.apache.http.client.methods.HttpEntityEnclosingRequestBase; +import com.fr.third.org.apache.http.client.methods.HttpGet; +import com.fr.third.org.apache.http.client.methods.HttpHead; +import com.fr.third.org.apache.http.client.methods.HttpOptions; +import com.fr.third.org.apache.http.client.methods.HttpPatch; +import com.fr.third.org.apache.http.client.methods.HttpPost; +import com.fr.third.org.apache.http.client.methods.HttpPut; +import com.fr.third.org.apache.http.client.methods.HttpTrace; +import com.fr.third.org.apache.http.client.methods.HttpUriRequest; +import com.fr.third.org.apache.http.client.protocol.HttpClientContext; +import com.fr.third.org.apache.http.impl.client.HttpClients; +import com.fr.third.org.apache.http.protocol.HttpContext; import com.fr.third.springframework.beans.factory.DisposableBean; import com.fr.third.springframework.http.HttpMethod; @@ -64,7 +64,7 @@ public class HttpComponentsClientHttpRequestFactory implements ClientHttpRequest static { try { // Looking for AbstractHttpClient class (deprecated as of HttpComponents 4.3) - abstractHttpClientClass = ClassUtils.forName("org.apache.http.impl.client.AbstractHttpClient", + abstractHttpClientClass = ClassUtils.forName("com.fr.third.org.apache.http.impl.client.AbstractHttpClient", HttpComponentsClientHttpRequestFactory.class.getClassLoader()); } catch (ClassNotFoundException ex) { @@ -146,7 +146,7 @@ public class HttpComponentsClientHttpRequestFactory implements ClientHttpRequest @SuppressWarnings("deprecation") private void setLegacyConnectionTimeout(HttpClient client, int timeout) { if (abstractHttpClientClass != null && abstractHttpClientClass.isInstance(client)) { - client.getParams().setIntParameter(org.apache.http.params.CoreConnectionPNames.CONNECTION_TIMEOUT, timeout); + client.getParams().setIntParameter(com.fr.third.org.apache.http.params.CoreConnectionPNames.CONNECTION_TIMEOUT, timeout); } } @@ -187,7 +187,7 @@ public class HttpComponentsClientHttpRequestFactory implements ClientHttpRequest @SuppressWarnings("deprecation") private void setLegacySocketTimeout(HttpClient client, int timeout) { if (abstractHttpClientClass != null && abstractHttpClientClass.isInstance(client)) { - client.getParams().setIntParameter(org.apache.http.params.CoreConnectionPNames.SO_TIMEOUT, timeout); + client.getParams().setIntParameter(com.fr.third.org.apache.http.params.CoreConnectionPNames.SO_TIMEOUT, timeout); } } @@ -342,7 +342,7 @@ public class HttpComponentsClientHttpRequestFactory implements ClientHttpRequest /** * Shutdown hook that closes the underlying - * {@link org.apache.http.conn.HttpClientConnectionManager ClientConnectionManager}'s + * {@link com.fr.third.org.apache.http.conn.HttpClientConnectionManager ClientConnectionManager}'s * connection pool, if any. */ @Override @@ -355,9 +355,9 @@ public class HttpComponentsClientHttpRequestFactory implements ClientHttpRequest /** - * An alternative to {@link org.apache.http.client.methods.HttpDelete} that - * extends {@link org.apache.http.client.methods.HttpEntityEnclosingRequestBase} - * rather than {@link org.apache.http.client.methods.HttpRequestBase} and + * An alternative to {@link com.fr.third.org.apache.http.client.methods.HttpDelete} that + * extends {@link com.fr.third.org.apache.http.client.methods.HttpEntityEnclosingRequestBase} + * rather than {@link com.fr.third.org.apache.http.client.methods.HttpRequestBase} and * hence allows HTTP delete with a request body. For use with the RestTemplate * exchange methods which allow the combination of HTTP DELETE with an entity. * @since 4.1.2 diff --git a/fine-spring/src/main/java/com/fr/third/springframework/http/client/HttpComponentsClientHttpResponse.java b/fine-spring/src/main/java/com/fr/third/springframework/http/client/HttpComponentsClientHttpResponse.java index 7eac80caa..8e9aa371c 100644 --- a/fine-spring/src/main/java/com/fr/third/springframework/http/client/HttpComponentsClientHttpResponse.java +++ b/fine-spring/src/main/java/com/fr/third/springframework/http/client/HttpComponentsClientHttpResponse.java @@ -20,10 +20,10 @@ import java.io.Closeable; import java.io.IOException; import java.io.InputStream; -import org.apache.http.Header; -import org.apache.http.HttpEntity; -import org.apache.http.HttpResponse; -import org.apache.http.util.EntityUtils; +import com.fr.third.org.apache.http.Header; +import com.fr.third.org.apache.http.HttpEntity; +import com.fr.third.org.apache.http.HttpResponse; +import com.fr.third.org.apache.http.util.EntityUtils; import com.fr.third.springframework.http.HttpHeaders; import com.fr.third.springframework.util.StreamUtils; diff --git a/fine-spring/src/main/java/com/fr/third/springframework/http/client/HttpComponentsStreamingClientHttpRequest.java b/fine-spring/src/main/java/com/fr/third/springframework/http/client/HttpComponentsStreamingClientHttpRequest.java index 11e6f0fb6..2a4db7d02 100644 --- a/fine-spring/src/main/java/com/fr/third/springframework/http/client/HttpComponentsStreamingClientHttpRequest.java +++ b/fine-spring/src/main/java/com/fr/third/springframework/http/client/HttpComponentsStreamingClientHttpRequest.java @@ -21,14 +21,14 @@ import java.io.InputStream; import java.io.OutputStream; import java.net.URI; -import org.apache.http.Header; -import org.apache.http.HttpEntity; -import org.apache.http.HttpEntityEnclosingRequest; -import org.apache.http.HttpResponse; -import org.apache.http.client.HttpClient; -import org.apache.http.client.methods.HttpUriRequest; -import org.apache.http.message.BasicHeader; -import org.apache.http.protocol.HttpContext; +import com.fr.third.org.apache.http.Header; +import com.fr.third.org.apache.http.HttpEntity; +import com.fr.third.org.apache.http.HttpEntityEnclosingRequest; +import com.fr.third.org.apache.http.HttpResponse; +import com.fr.third.org.apache.http.client.HttpClient; +import com.fr.third.org.apache.http.client.methods.HttpUriRequest; +import com.fr.third.org.apache.http.message.BasicHeader; +import com.fr.third.org.apache.http.protocol.HttpContext; import com.fr.third.springframework.http.HttpHeaders; import com.fr.third.springframework.http.HttpMethod;