修改线程池位置
This commit is contained in:
@@ -79,6 +79,7 @@ public class WxHomeController {
|
||||
if (HomeCacheManager.hasData(HomeCacheManager.INDEX)) {
|
||||
return ResponseUtil.ok(HomeCacheManager.getCacheData(HomeCacheManager.INDEX));
|
||||
}
|
||||
ExecutorService executorService = Executors.newFixedThreadPool(10);
|
||||
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
|
||||
@@ -137,6 +138,7 @@ public class WxHomeController {
|
||||
}
|
||||
//缓存数据
|
||||
HomeCacheManager.loadData(HomeCacheManager.INDEX, data);
|
||||
executorService.shutdown();
|
||||
return ResponseUtil.ok(data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user