From f453226c3b6bb0b7986ef8181f5137718fb015b3 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Mon, 12 Jul 2021 11:05:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20mockjs=E5=AF=BC=E8=87=B4=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/java/io/metersphere/api/dto/scenario/Body.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/api/dto/scenario/Body.java b/backend/src/main/java/io/metersphere/api/dto/scenario/Body.java index b86f1d48b0..ee25b769a0 100644 --- a/backend/src/main/java/io/metersphere/api/dto/scenario/Body.java +++ b/backend/src/main/java/io/metersphere/api/dto/scenario/Body.java @@ -100,7 +100,7 @@ public class Body { if(value instanceof JSONObject) { jsonMockParse((JSONObject) value); } else if(value instanceof String) { - if (StringUtils.isNotBlank((String) value)) { + if (StringUtils.isNotBlank((String) value) && ((String) value).trim().startsWith("@")) { value = ScriptEngineUtils.calculate((String) value); } jsonObject.put(key, value);