From 4dfaa1c463ef49c39ea6ca3aa08c206624ba8e02 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Wed, 6 Jan 2021 18:34:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96):=20=E4=BF=AE=E5=A4=8D=E6=95=B0=E6=8D=AE=E8=BF=81?= =?UTF-8?q?=E7=A7=BB=EF=BC=8Csql=E7=B1=BB=E5=9E=8B=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=BA=90=E4=B8=A2=E5=A4=B1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/service/HistoricalDataUpgradeService.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/service/HistoricalDataUpgradeService.java b/backend/src/main/java/io/metersphere/api/service/HistoricalDataUpgradeService.java index 8220ca72e5..afd82bd0bb 100644 --- a/backend/src/main/java/io/metersphere/api/service/HistoricalDataUpgradeService.java +++ b/backend/src/main/java/io/metersphere/api/service/HistoricalDataUpgradeService.java @@ -122,9 +122,8 @@ public class HistoricalDataUpgradeService { element.setType("DubboSampler"); } if (request instanceof SqlRequest) { - element = new MsJDBCSampler(); - SqlRequest request1 = (SqlRequest) request; - BeanUtils.copyBean(element, request1); + String requestJson = JSON.toJSONString(request); + element = JSON.parseObject(requestJson, MsJDBCSampler.class); element.setType("JDBCSampler"); } if (request instanceof TCPRequest) {