From 7356d9237b0238970985b1af7a71e2110242985c Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Mon, 10 Oct 2022 14:07:56 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E6=9B=B4=E6=94=B9mock=E7=8E=AF=E5=A2=83=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E6=97=B6=E7=9A=84=E5=9C=B0=E5=9D=80=EF=BC=8C=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E4=B8=8Aapi=E6=9C=8D=E5=8A=A1=E5=9F=9F=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更改mock环境初始化时的地址,添加上api服务域名 --- .../environment/service/BaseEnvironmentService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/environment/service/BaseEnvironmentService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/environment/service/BaseEnvironmentService.java index 06d7d32ce0..c399894e6f 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/environment/service/BaseEnvironmentService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/environment/service/BaseEnvironmentService.java @@ -558,7 +558,7 @@ public class BaseEnvironmentService extends NodeTreeService { } String projectSocket = String.valueOf(obj.get("socket")); - if (!StringUtils.contains(projectSocket, "/mock/" + projectNumber)) { + if (!StringUtils.contains(projectSocket, "/api/mock/" + projectNumber)) { needUpdate = true; break; } @@ -657,7 +657,7 @@ public class BaseEnvironmentService extends NodeTreeService { JSONObject httpItem = new JSONObject(); httpItem.put("id", UUID.randomUUID().toString()); httpItem.put("type", "NONE"); - httpItem.put("socket", socket + "/mock/" + projectNumber); + httpItem.put("socket", socket + "/api/mock/" + projectNumber); httpItem.put("protocol", protocal); List> protocolVariablesArr = new LinkedList<>(); Map protocolMap = new HashMap<>();