diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a0fc48cf..b53f12e2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,3 +4,4 @@ - [Optimize: remove discovery module useless code](https://github.com/Tencent/spring-cloud-tencent/pull/596) - [Optimize: optimize configuration conditional & optimize config data tips"](https://github.com/Tencent/spring-cloud-tencent/pull/604) - [Optimize: Maybe remove Chinese characters](https://github.com/Tencent/spring-cloud-tencent/pull/608) +- [Bugfix: fix feign report call result error when using feign direct call](https://github.com/Tencent/spring-cloud-tencent/pull/622) diff --git a/spring-cloud-tencent-rpc-enhancement/src/main/java/com/tencent/cloud/rpc/enhancement/feign/plugin/reporter/ReporterUtils.java b/spring-cloud-tencent-rpc-enhancement/src/main/java/com/tencent/cloud/rpc/enhancement/feign/plugin/reporter/ReporterUtils.java index 2d49c5221..f0af78d0d 100644 --- a/spring-cloud-tencent-rpc-enhancement/src/main/java/com/tencent/cloud/rpc/enhancement/feign/plugin/reporter/ReporterUtils.java +++ b/spring-cloud-tencent-rpc-enhancement/src/main/java/com/tencent/cloud/rpc/enhancement/feign/plugin/reporter/ReporterUtils.java @@ -75,7 +75,8 @@ public final class ReporterUtils { resultRequest.setCallerService(new ServiceKey(sourceNamespace, sourceService)); } resultRequest.setHost(uri.getHost()); - resultRequest.setPort(uri.getPort()); + // -1 means access directly by url, and use http default port number 80 + resultRequest.setPort(uri.getPort() == -1 ? 80 : uri.getPort()); return resultRequest; }