mirror of
https://github.com/tencentmusic/supersonic.git
synced 2026-04-21 14:14:19 +08:00
(improvement)(launcher) upgrade to the latest httpclient&core to support "LaxRedirectStrategy"
This commit is contained in:
@@ -2,8 +2,7 @@ package com.tencent.supersonic.config;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
import org.apache.hc.client5.http.impl.DefaultRedirectStrategy;
|
import org.apache.hc.client5.http.impl.LaxRedirectStrategy;
|
||||||
//import org.apache.hc.client5.http.impl.LaxRedirectStrategy;
|
|
||||||
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
|
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
|
||||||
import org.apache.hc.client5.http.impl.classic.HttpClientBuilder;
|
import org.apache.hc.client5.http.impl.classic.HttpClientBuilder;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
@@ -22,8 +21,8 @@ public class RestTemplateConfig {
|
|||||||
|
|
||||||
// HttpClient 5 较新版本才会有LaxRedirectStrategy, 所以我重新定义了
|
// HttpClient 5 较新版本才会有LaxRedirectStrategy, 所以我重新定义了
|
||||||
CloseableHttpClient httpClient =
|
CloseableHttpClient httpClient =
|
||||||
HttpClientBuilder.create().setRedirectStrategy(new DefaultRedirectStrategy()) // 使用宽松重定向策略
|
//HttpClientBuilder.create().setRedirectStrategy(new DefaultRedirectStrategy()) // 使用宽松重定向策略
|
||||||
//HttpClientBuilder.create().setRedirectStrategy(new LaxRedirectStrategy()) // 使用宽松重定向策略
|
HttpClientBuilder.create().setRedirectStrategy(new LaxRedirectStrategy()) // 使用宽松重定向策略
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
HttpComponentsClientHttpRequestFactory httpRequestFactory =
|
HttpComponentsClientHttpRequestFactory httpRequestFactory =
|
||||||
|
|||||||
6
pom.xml
6
pom.xml
@@ -48,9 +48,9 @@
|
|||||||
<alibaba.druid.version>1.2.3</alibaba.druid.version>
|
<alibaba.druid.version>1.2.3</alibaba.druid.version>
|
||||||
<mysql.connector.java.version>5.1.46</mysql.connector.java.version>
|
<mysql.connector.java.version>5.1.46</mysql.connector.java.version>
|
||||||
<mybatis.plus.version>3.5.7</mybatis.plus.version>
|
<mybatis.plus.version>3.5.7</mybatis.plus.version>
|
||||||
<!-- <httpclient5.version>5.4.1</httpclient5.version>-->
|
<httpclient5.version>5.4.1</httpclient5.version>
|
||||||
<!--<!– <httpcore.version>4.4.16</httpcore.version>–>-->
|
<!-- <httpcore.version>4.4.16</httpcore.version>-->
|
||||||
<!-- <httpcore5.version>5.3.1</httpcore5.version>-->
|
<httpcore5.version>5.3.1</httpcore5.version>
|
||||||
<clickhouse.jdbc.version>0.4.6</clickhouse.jdbc.version>
|
<clickhouse.jdbc.version>0.4.6</clickhouse.jdbc.version>
|
||||||
<fastjson.version>2.0.40</fastjson.version>
|
<fastjson.version>2.0.40</fastjson.version>
|
||||||
<dozer.verson>7.0.0</dozer.verson>
|
<dozer.verson>7.0.0</dozer.verson>
|
||||||
|
|||||||
Reference in New Issue
Block a user