fix:compatible with older Spring Cloud version.

pull/1080/head
Haotian Zhang 2 years ago
parent 74ceadec5c
commit 54b8111272

@ -79,7 +79,7 @@ Spring Cloud Tencent 所有组件都已上传到 Maven 中央仓库,只需要
<groupId>com.tencent.cloud</groupId>
<artifactId>spring-cloud-tencent-dependencies</artifactId>
<!--version number-->
<version>1.11.4-Hoxton.SR12</version>
<version>1.11.5-Hoxton.SR12</version>
<type>pom</type>
<scope>import</scope>
</dependency>

@ -76,7 +76,7 @@ For example:
<groupId>com.tencent.cloud</groupId>
<artifactId>spring-cloud-tencent-dependencies</artifactId>
<!--version number-->
<version>1.11.4-Hoxton.SR12</version>
<version>1.11.5-Hoxton.SR12</version>
<type>pom</type>
<scope>import</scope>
</dependency>

@ -89,7 +89,7 @@
<properties>
<!-- Project revision -->
<revision>1.11.4-Hoxton.SR12</revision>
<revision>1.11.6-Hoxton.SR12-SNAPSHOT</revision>
<!-- Spring Framework -->
<spring.framework.version>5.2.22.RELEASE</spring.framework.version>

@ -70,7 +70,7 @@
</developers>
<properties>
<revision>1.11.4-Hoxton.SR12</revision>
<revision>1.11.6-Hoxton.SR12-SNAPSHOT</revision>
<!-- Dependencies -->
<polaris.version>1.12.5</polaris.version>

@ -17,7 +17,7 @@
<!-- Spring Cloud Tencent dependencies start -->
<dependency>
<groupId>com.tencent.cloud</groupId>
<artifactId>spring-cloud-tencent-polaris-loadbalancer</artifactId>
<artifactId>spring-cloud-tencent-polaris-context</artifactId>
</dependency>
<!-- Spring Cloud Tencent dependencies end -->

@ -87,10 +87,8 @@ public class EnhancedFeignClient implements Client {
.build();
enhancedPluginContext.setResponse(enhancedResponseContext);
DefaultServiceInstance serviceInstance = new DefaultServiceInstance();
serviceInstance.setServiceId(request.requestTemplate().feignTarget().name());
serviceInstance.setHost(url.getHost());
serviceInstance.setPort(url.getPort());
DefaultServiceInstance serviceInstance = new DefaultServiceInstance(request.requestTemplate().feignTarget()
.name(), url.getHost(), url.getPort(), url.getScheme().equals("https"));
enhancedPluginContext.setServiceInstance(serviceInstance);
// Run post enhanced plugins.

Loading…
Cancel
Save