Unverified Commit 8c1b5d57 authored by 端午安康's avatar 端午安康 Committed by GitHub
Browse files

线程池问题修复-WxHomeController (#470)

* 1.wx:修复首页线程池问题

* 1.wx:修复首页线程池问题
parent e6289129
...@@ -81,7 +81,8 @@ public class WxHomeController { ...@@ -81,7 +81,8 @@ public class WxHomeController {
if (HomeCacheManager.hasData(HomeCacheManager.INDEX)) { if (HomeCacheManager.hasData(HomeCacheManager.INDEX)) {
return ResponseUtil.ok(HomeCacheManager.getCacheData(HomeCacheManager.INDEX)); return ResponseUtil.ok(HomeCacheManager.getCacheData(HomeCacheManager.INDEX));
} }
ExecutorService executorService = Executors.newFixedThreadPool(10); //相当于每次都是new的线程池 没意义
//ExecutorService executorService = Executors.newFixedThreadPool(10);
Callable<List> bannerListCallable = () -> adService.queryIndex(); Callable<List> bannerListCallable = () -> adService.queryIndex();
...@@ -144,9 +145,10 @@ public class WxHomeController { ...@@ -144,9 +145,10 @@ public class WxHomeController {
} }
catch (Exception e) { catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
}finally {
executorService.shutdown();
} }
// finally {
// executorService.shutdown();
// }
return ResponseUtil.ok(entity); return ResponseUtil.ok(entity);
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment