From 7d74f3fd087d4a8192ed556a6c2e3a2ea3c81cff Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期五, 28 三月 2025 17:43:48 +0800
Subject: [PATCH] 1. 新增扬尘监测数据上传功能

---
 src/main/kotlin/cn/flightfeather/supervision/socket/WebSocketSenderHandler.java |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/src/main/kotlin/cn/flightfeather/supervision/socket/WebSocketSenderHandler.java b/src/main/kotlin/cn/flightfeather/supervision/socket/WebSocketSenderHandler.java
new file mode 100644
index 0000000..3ac4f5c
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/socket/WebSocketSenderHandler.java
@@ -0,0 +1,19 @@
+package cn.flightfeather.supervision.socket;
+
+import cn.flightfeather.supervision.socket.processor.WebSocketSender;
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+import org.springframework.stereotype.Component;
+
+@Component
+public class WebSocketSenderHandler implements ApplicationContextAware {
+    static private ApplicationContext applicationContext;
+    @Override
+    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
+        WebSocketSenderHandler.applicationContext = applicationContext;
+    }
+    public static WebSocketSender getInstance() {
+        return applicationContext.getBean(WebSocketSender.class);
+    }
+}

--
Gitblit v1.9.3