diff --git a/backend/src/main/java/io/metersphere/api/dto/automation/parse/EsbDataParser.java b/backend/src/main/java/io/metersphere/api/dto/automation/parse/EsbDataParser.java index 602b079264..577aea787e 100644 --- a/backend/src/main/java/io/metersphere/api/dto/automation/parse/EsbDataParser.java +++ b/backend/src/main/java/io/metersphere/api/dto/automation/parse/EsbDataParser.java @@ -101,22 +101,4 @@ public class EsbDataParser { } return returnData; } - - public static void main(String[] args) { - String str = "[{\"systemName\":\"\",\"children\":[{\"systemName\":\"\",\"children\":[{\"systemName\":\"\",\"children\":[],\"name\":\"CardNo\",\"description\":\"\",\"type\":\"string\",\"contentType\":\"30\",\"uuid\":\"295f4\",\"value\":\"627713288321\",\"required\":true,\"status\":\"\"},{\"name\":\"AccoutNo\",\"systemName\":\"\",\"status\":\"\",\"type\":\"string\",\"contentType\":\"6\",\"required\":false,\"description\":\"\",\"uuid\":\"3e8ef\",\"children\":[],\"value\":\"371421321\"}],\"name\":\"HEAD\",\"description\":\"\",\"type\":\"[object]\",\"contentType\":\"\",\"uuid\":\"55483\",\"required\":false,\"status\":\"\"},{\"name\":\"Body\",\"systemName\":\"\",\"status\":\"\",\"type\":\"[object]\",\"contentType\":\"\",\"required\":false,\"description\":\"\",\"uuid\":\"a088b\",\"children\":[{\"name\":\"returnFlag\",\"systemName\":\"\",\"status\":\"\",\"type\":\"string\",\"contentType\":\"2\",\"required\":false,\"description\":\"\",\"uuid\":\"76d75\",\"children\":[],\"value\":\"1\"}]}],\"name\":\"SERVICE\",\"description\":\"\",\"type\":\"[object]\",\"contentType\":\"\",\"uuid\":\"faf95\",\"required\":false,\"status\":\"\"}]"; - List list = JSONArray.parseArray(str, EsbDataStruct.class); - String[] paramArr = new String[]{"HEAD"}; - System.out.println(esbData2XmlByParamStruct(list, paramArr)); - - paramArr = new String[]{"SERVICE"}; - System.out.println(esbData2XmlByParamStruct(list, paramArr)); - - paramArr = new String[]{"Body"}; - System.out.println(esbData2XmlByParamStruct(list, paramArr)); - - paramArr = new String[]{"SERVICE","Body"}; - System.out.println(esbData2XmlByParamStruct(list, paramArr)); - - } - } diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/parse/har/HarUtils.java b/backend/src/main/java/io/metersphere/api/dto/definition/parse/har/HarUtils.java index e7fed00d19..4c1113fc9f 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/parse/har/HarUtils.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/parse/har/HarUtils.java @@ -54,13 +54,4 @@ public class HarUtils { Har har = JSONObject.parseObject(harJson, Har.class); return har; } - - public static void main(String[] args) throws UnsupportedEncodingException { -// String str = "%E6%B5%8B%AF"; - String str = "测试"; - str = URLEncoder.encode(str,"UTF-8"); - System.out.println(str); - str = URLDecoder.decode(str,"UTF-8"); - System.out.println(str); - } } diff --git a/backend/src/main/java/io/metersphere/websocket/c/to/c/MsWebSocketClient.java b/backend/src/main/java/io/metersphere/websocket/c/to/c/MsWebSocketClient.java index 4f6403c00f..b7f31a57d0 100644 --- a/backend/src/main/java/io/metersphere/websocket/c/to/c/MsWebSocketClient.java +++ b/backend/src/main/java/io/metersphere/websocket/c/to/c/MsWebSocketClient.java @@ -38,18 +38,4 @@ public class MsWebSocketClient extends WebSocketClient{ public void onError(Exception e) { System.out.println("异常"+e); } - public static void main(String[] args) { - try { - MsWebSocketClient client = new MsWebSocketClient("ws://127.0.0.1:8081/ws/22222"); - client.connect(); - System.out.println("建立websocket连接"); - MsgDto dto = new MsgDto(); - dto.setContent("099991023123123"); - dto.setReportId("123123123"); - dto.setToReport("3933abd9"); - client.send(JSON.toJSONString(dto)); - } catch (URISyntaxException e) { - LogUtil.error(e); - } - } }