Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
8c1b5d57
Unverified
Commit
8c1b5d57
authored
May 19, 2021
by
端午安康
Committed by
GitHub
May 19, 2021
Browse files
线程池问题修复-WxHomeController (#470)
* 1.wx:修复首页线程池问题 * 1.wx:修复首页线程池问题
parent
e6289129
Changes
1
Hide whitespace changes
Inline
Side-by-side
litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxHomeController.java
View file @
8c1b5d57
...
...
@@ -81,7 +81,8 @@ public class WxHomeController {
if
(
HomeCacheManager
.
hasData
(
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
();
...
...
@@ -144,9 +145,10 @@ public class WxHomeController {
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
executorService
.
shutdown
();
}
// finally {
// executorService.shutdown();
// }
return
ResponseUtil
.
ok
(
entity
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment