From 3a56308b1a8f3f453a56da52af64ad4ba669aec1 Mon Sep 17 00:00:00 2001 From: jiazx0107@163.com <jiazx0107@163.com> Date: 星期三, 13 十二月 2023 15:41:38 +0800 Subject: [PATCH] 提交邦海智能粮情协议解析--1 --- src/main/java/com/fzzy/gateway/GatewayRunner.java | 27 ++++++++++++++++++++++++++- 1 files changed, 26 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/fzzy/gateway/GatewayRunner.java b/src/main/java/com/fzzy/gateway/GatewayRunner.java index c8da840..5c257ee 100644 --- a/src/main/java/com/fzzy/gateway/GatewayRunner.java +++ b/src/main/java/com/fzzy/gateway/GatewayRunner.java @@ -1,7 +1,9 @@ package com.fzzy.gateway; import com.fzzy.gateway.hx2023.service.ApiInitService; +import com.fzzy.mqtt.MqttPublishService; import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.CommandLineRunner; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Service; @@ -18,11 +20,34 @@ @Resource private ApiInitService apiInitService; + @Resource + private MqttPublishService mqttPublishService; + @Resource + private GatewayTimerScheduled scheduled; + @Override public void run(String... args) throws Exception { - log.info("缃戝叧鎺ュ彛闅忕郴缁熷惎鍔�------------"); + + log.info("---------MQTT鍒濆鍖�--------------"); + mqttPublishService.init(); + + //缃戝叧鍒濆鍖� + log.info("---------缃戝叧璁惧鍒濆鍖�--------------"); + apiInitService.init(); + + + //鑾峰彇姘旇薄淇℃伅 + scheduled.doWeatherExe(); + + //鏇存柊璁惧缂撳瓨 + log.info("---------璁惧缂撳瓨鍒濆鍖�--------------"); + apiInitService.updateDeviceCache(); + + //鍒濆鍖栬溅鐗岃瘑鍒� + log.info("---------杞︾墝璇嗗埆鍒濆鍖�--------------"); + apiInitService.initAllLpr(); } } -- Gitblit v1.9.3