From 8c8e78eac51fdc57942e1e348ba54d0116515408 Mon Sep 17 00:00:00 2001
From: zhangyong <517047165@qq.com>
Date: 星期三, 08 五月 2024 10:38:46 +0800
Subject: [PATCH] 修正plc读取代码方式
---
hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/CacheGlassModuleApplication.java | 37 +++++++++++++++++++++++++++++++++++++
1 files changed, 37 insertions(+), 0 deletions(-)
diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/CacheGlassModuleApplication.java b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/CacheGlassModuleApplication.java
new file mode 100644
index 0000000..42b56a2
--- /dev/null
+++ b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/CacheGlassModuleApplication.java
@@ -0,0 +1,37 @@
+package com.mes;
+
+import com.mes.common.WebSocketServer;
+import lombok.extern.slf4j.Slf4j;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+import org.springframework.context.ConfigurableApplicationContext;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+import com.mes.edgstoragecage.service.*;
+
+/**
+ * @Author : zhoush
+ * @Date: 2024/3/25 10:49
+ * @Description:
+ */
+@Slf4j
+@SpringBootApplication
+@MapperScan("com.mes.*.mapper")
+@EnableDiscoveryClient
+@EnableSwagger2
+public class CacheGlassModuleApplication {
+
+ public static void main(String[] args) {
+ try {
+ SpringApplication springApplication = new SpringApplication(CacheGlassModuleApplication.class);
+ ConfigurableApplicationContext applicationContext = springApplication.run(args);
+ WebSocketServer.setApplicationContext(applicationContext);
+ //SpringApplication.run(CacheGlassModuleApplication.class, args);
+ } catch (Exception e) {
+ log.error(e.getMessage());
+ }
+
+ }
+}
--
Gitblit v1.8.0