From 06bd2d6dbd31315b68e768d6b59139c753f8ff96 Mon Sep 17 00:00:00 2001 From: Junjie <fallin.jie@qq.com> Date: 星期一, 27 三月 2023 09:28:38 +0800 Subject: [PATCH] 四向穿梭车线程代码逻辑 --- src/main/java/com/zy/core/ServerBootstrap.java | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/zy/core/ServerBootstrap.java b/src/main/java/com/zy/core/ServerBootstrap.java index 024304c..1958d24 100644 --- a/src/main/java/com/zy/core/ServerBootstrap.java +++ b/src/main/java/com/zy/core/ServerBootstrap.java @@ -1,5 +1,6 @@ package com.zy.core; +import com.zy.common.utils.RedisUtil; import com.zy.core.cache.MessageQueue; import com.zy.core.cache.SlaveConnection; import com.zy.core.enums.SlaveType; @@ -25,6 +26,8 @@ private SlaveProperties slaveProperties; @Autowired private MainProcess mainProcess; + @Autowired + private RedisUtil redisUtil; @PostConstruct @@ -108,7 +111,7 @@ // 鍒濆鍖栧洓鍚戠┛姊溅 News.info("鍒濆鍖栧洓鍚戠┛姊溅......................................................"); for (ShuttleSlave shuttleSlave : slaveProperties.getShuttle()) { - ShuttleThread shuttleThread = new ShuttleThread(shuttleSlave); + ShuttleThread shuttleThread = new ShuttleThread(shuttleSlave,redisUtil); new Thread(shuttleThread).start(); SlaveConnection.put(SlaveType.Shuttle, shuttleSlave.getId(), shuttleThread); } -- Gitblit v1.9.1