|
@@ -25,6 +25,8 @@ import java.util.ArrayList;
|
|
|
import java.util.Collections;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
+import java.util.concurrent.ExecutorService;
|
|
|
+import java.util.concurrent.Executors;
|
|
|
|
|
|
/**
|
|
|
* 布控命中数据处理
|
|
@@ -48,17 +50,17 @@ public class ConsumeService implements ApplicationListener<ContextRefreshedEvent
|
|
|
// IOC容器刷新完成后就会发布ContextRefreshedEvent事件
|
|
|
@Override
|
|
|
public void onApplicationEvent(ContextRefreshedEvent contextRefreshedEvent) {
|
|
|
- /*ExecutorService executor = Executors.newFixedThreadPool(1);
|
|
|
+ ExecutorService executor = Executors.newFixedThreadPool(1);
|
|
|
executor.execute(() -> {
|
|
|
if (contextRefreshedEvent.getApplicationContext().getParent() == null) {
|
|
|
try {
|
|
|
- this.dataConsumeAndProduce();
|
|
|
+ this.dataConsume();
|
|
|
} catch (Exception e) {
|
|
|
log.error("【QBEQSJYCTRL】 数据处理服务启动异常", e);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
- executor.shutdown();*/
|
|
|
+ executor.shutdown();
|
|
|
}
|
|
|
|
|
|
public void dataConsume() {
|