diff --git a/ruoyi-modules/hw-data-process/pom.xml b/ruoyi-modules/hw-data-process/pom.xml
index d2f099a..178197b 100644
--- a/ruoyi-modules/hw-data-process/pom.xml
+++ b/ruoyi-modules/hw-data-process/pom.xml
@@ -96,6 +96,11 @@
jts-core
1.19.0
+
+ org.eclipse.californium
+ californium-core
+ 3.12.1
+
diff --git a/ruoyi-modules/hw-data-process/src/main/java/com/ruoyi/dataprocess/coap/coapHandler/ResourceHandle.java b/ruoyi-modules/hw-data-process/src/main/java/com/ruoyi/dataprocess/coap/coapHandler/ResourceHandle.java
new file mode 100644
index 0000000..6a37459
--- /dev/null
+++ b/ruoyi-modules/hw-data-process/src/main/java/com/ruoyi/dataprocess/coap/coapHandler/ResourceHandle.java
@@ -0,0 +1,33 @@
+package com.ruoyi.dataprocess.coap.coapHandler;
+
+import org.eclipse.californium.core.CoapResource;
+import org.eclipse.californium.core.coap.CoAP;
+import org.eclipse.californium.core.coap.OptionSet;
+import org.eclipse.californium.core.server.resources.CoapExchange;
+
+import java.net.InetAddress;
+import java.nio.charset.StandardCharsets;
+
+public class ResourceHandle extends CoapResource {
+ public ResourceHandle(String name) {
+ super(name);
+ }
+
+ @Override
+ public void handleGET(CoapExchange exchange) {
+ exchange.respond(CoAP.ResponseCode._UNKNOWN_SUCCESS_CODE,"get请求",50);
+ InetAddress sourceAddress = exchange.getSourceAddress();
+ System.out.println(sourceAddress);
+ OptionSet requestOptions = exchange.getRequestOptions();
+ System.out.println(requestOptions);
+ System.out.println(exchange.getQueryParameter("a"));
+ }
+
+ @Override
+ public void handlePOST(CoapExchange exchange) {
+ System.out.println(new String(exchange.getRequestPayload(), StandardCharsets.UTF_8));
+ exchange.respond(CoAP.ResponseCode.CONTENT,"回复成功",50);
+ }
+
+
+}
diff --git a/ruoyi-modules/hw-data-process/src/main/java/com/ruoyi/dataprocess/coap/coapHandler/test.java b/ruoyi-modules/hw-data-process/src/main/java/com/ruoyi/dataprocess/coap/coapHandler/test.java
new file mode 100644
index 0000000..25fc141
--- /dev/null
+++ b/ruoyi-modules/hw-data-process/src/main/java/com/ruoyi/dataprocess/coap/coapHandler/test.java
@@ -0,0 +1,47 @@
+package com.ruoyi.dataprocess.coap.coapHandler;
+
+import net.dreamlu.iot.mqtt.codec.MqttPublishMessage;
+import net.dreamlu.iot.mqtt.spring.client.MqttClientTemplate;
+import org.eclipse.californium.core.CoapClient;
+import org.eclipse.californium.core.CoapHandler;
+import org.eclipse.californium.core.CoapResponse;
+import org.eclipse.californium.elements.exception.ConnectorException;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.HashMap;
+
+@RestController
+public class test {
+ @GetMapping("test")
+ public void test() throws ConnectorException, IOException {
+ CoapClient coapClient = new CoapClient("coap://10.11.40.122:5683/shidu");
+ coapClient.setURI("coap://10.11.40.122:5683/shidu?a=b");
+ CoapResponse coapResponse1 = coapClient.get(40);
+ System.out.println(new String(coapResponse1.getPayload(),StandardCharsets.UTF_8));
+ HashMap