From 17480b5b82744f4c74b61a2f1e4e5ea780ccc3ff Mon Sep 17 00:00:00 2001 From: zhuguifei <312353457@qq.com> Date: 星期三, 27 十一月 2024 13:45:25 +0800 Subject: [PATCH] 修复冲突 --- /dev/null | 29 -------------- jeecg-module-dry/jeecg-module-dry-start/src/main/test/com/lanbao/SocketTest.java | 40 ++++++++++++++++++++ jeecg-module-dry/jeecg-module-dry-start/src/main/test/com/lanbao/AiTest.java | 0 3 files changed, 40 insertions(+), 29 deletions(-) diff --git a/jeecg-module-dry/jeecg-module-dry-start/src/main/test/java/com/lanbao/AiTest.java b/jeecg-module-dry/jeecg-module-dry-start/src/main/test/com/lanbao/AiTest.java similarity index 100% rename from jeecg-module-dry/jeecg-module-dry-start/src/main/test/java/com/lanbao/AiTest.java rename to jeecg-module-dry/jeecg-module-dry-start/src/main/test/com/lanbao/AiTest.java diff --git a/jeecg-module-dry/jeecg-module-dry-start/src/main/test/com/lanbao/SocketTest.java b/jeecg-module-dry/jeecg-module-dry-start/src/main/test/com/lanbao/SocketTest.java new file mode 100644 index 0000000..1095500 --- /dev/null +++ b/jeecg-module-dry/jeecg-module-dry-start/src/main/test/com/lanbao/SocketTest.java @@ -0,0 +1,40 @@ +package com.lanbao; + +import com.alibaba.fastjson.JSONObject; +import org.apache.commons.collections.MapUtils; +import org.jeecg.modules.dry.vo.SocketMsgVo; +import org.junit.Test; + +import java.io.IOException; +import java.io.InputStream; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.net.Socket; +import java.nio.channels.SocketChannel; +import java.util.HashMap; +import java.util.Map; + +public class SocketTest { + public static void main(String[] args) { + Map<String, Integer> mapA = new HashMap<>(); + mapA.put("apple", 10); + mapA.put("banana", 20); + mapA.put("orange", 30); + mapA.put("hah", 30); + + Map<String, Integer> mapB = new HashMap<>(); + mapB.put("apple", 10); + mapB.put("pineapple", 40); + mapB.put("dd", 40); + +// 妫�鏌� mapB 涓己灏戠殑閿� + // 妫�鏌� mapB 涓己灏戠殑閿� + mapA.keySet().stream() + .filter(key -> !mapB.containsKey(key)) + .forEach(key -> System.out.println("Map B 涓己灏戠殑閿�: " + key)); + } + @Test + public void test(){ + + } +} diff --git a/jeecg-module-dry/jeecg-module-dry-start/src/main/test/java/com/lanbao/SocketTest.java b/jeecg-module-dry/jeecg-module-dry-start/src/main/test/java/com/lanbao/SocketTest.java deleted file mode 100644 index 4590ae1..0000000 --- a/jeecg-module-dry/jeecg-module-dry-start/src/main/test/java/com/lanbao/SocketTest.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.lanbao; - -import com.alibaba.fastjson.JSONObject; -import org.jeecg.modules.dry.vo.SocketMsgVo; - -import java.io.IOException; -import java.io.InputStream; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.net.Socket; -import java.nio.channels.SocketChannel; - -public class SocketTest { - public static void main(String[] args) { - try { - Socket socket = new Socket("192.168.2.6", 1115); - ObjectOutputStream oos = new ObjectOutputStream(socket.getOutputStream()); - - SocketMsgVo msgVo = new SocketMsgVo(); - msgVo.setCode("1"); - msgVo.setMsg("1111"); - oos.writeObject(JSONObject.toJSONString(msgVo)); - oos.close(); - socket.close(); - } catch (IOException e) { - throw new RuntimeException(e); - } - } -} -- Gitblit v1.9.3