From eba0a973f03126d085abe02bef5c912be4047420 Mon Sep 17 00:00:00 2001 From: jiazx0107@163.com <jiazx0107@163.com> Date: 星期五, 10 十一月 2023 22:40:55 +0800 Subject: [PATCH] 优化粮情返回与请求绑定 --- src/main/java/com/fzzy/gateway/GatewayRunner.java | 18 +++++++++++++++++- 1 files changed, 17 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..1f05550 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,25 @@ @Resource private ApiInitService apiInitService; + @Autowired + private MqttPublishService mqttPublishService; + @Autowired + private GatewayTimerScheduled scheduled; @Override public void run(String... args) throws Exception { - log.info("缃戝叧鎺ュ彛闅忕郴缁熷惎鍔�------------"); + mqttPublishService.init(); + //鎵ц鍒濆鍖栨柟妗� + apiInitService.init(); + + + //鑾峰彇姘旇薄淇℃伅 + scheduled.doWeatherExe(); + + //鏇存柊璁惧缂撳瓨 + apiInitService.updateDeviceCache(); + } } -- Gitblit v1.9.3