diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java b/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java index 3a80c1ea8b..9de878cb72 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java @@ -465,7 +465,7 @@ public class MsHTTPSamplerProxy extends MsTestElement { url = "http://" + url; } if (StringUtils.isNotEmpty(this.getPort()) && this.getPort().startsWith("${")) { - url.replaceAll(this.getPort(), "10990"); + url = url.replaceAll(this.getPort(), "10990"); } if (url == null) { MSException.throwException("请重新选择环境");