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> <groupId>com.tencent.cloud</groupId>
<artifactId>spring-cloud-tencent-dependencies</artifactId> <artifactId>spring-cloud-tencent-dependencies</artifactId>
<!--version number--> <!--version number-->
<version>1.11.4-Hoxton.SR12</version> <version>1.11.5-Hoxton.SR12</version>
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>

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

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

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

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

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

Loading…
Cancel
Save