From 1e9ba6d6a289110b1c0c2d409a645ee2d8893217 Mon Sep 17 00:00:00 2001 From: linwl <304115325@qq.com> Date: Thu, 25 Feb 2021 11:46:14 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E6=95=B0=E7=BA=BF=E7=A8=8B=E5=A4=84?= =?UTF-8?q?=E7=90=86=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/telpo/iotgateway/listener/IotMessageListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/telpo/iotgateway/listener/IotMessageListener.java b/src/main/java/com/telpo/iotgateway/listener/IotMessageListener.java index 18f88ae..663e9d5 100644 --- a/src/main/java/com/telpo/iotgateway/listener/IotMessageListener.java +++ b/src/main/java/com/telpo/iotgateway/listener/IotMessageListener.java @@ -19,7 +19,7 @@ import java.util.concurrent.atomic.AtomicInteger; @Component public class IotMessageListener implements MessageListener { - private AtomicInteger count = new AtomicInteger(0); + private volatile AtomicInteger count = new AtomicInteger(0); /** * Runnable:实现了Runnable接口,jdk就知道这个类是一个线程 */