@@ -19,7 +19,7 @@ import java.util.concurrent.atomic.AtomicInteger; | |||||
@Component | @Component | ||||
public class IotMessageListener implements MessageListener { | public class IotMessageListener implements MessageListener { | ||||
private AtomicInteger count = new AtomicInteger(0); | |||||
private volatile AtomicInteger count = new AtomicInteger(0); | |||||
/** | /** | ||||
* Runnable:实现了Runnable接口,jdk就知道这个类是一个线程 | * Runnable:实现了Runnable接口,jdk就知道这个类是一个线程 | ||||
*/ | */ | ||||