diff options
author | Vitaly Takmazov | 2020-03-07 16:16:46 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2020-03-07 16:16:46 +0300 |
commit | ff437b1206824a87c1de051219dd5d054eb309d1 (patch) | |
tree | c00d5e5e2ef27f31d71d96e0f212e7a4d0f2c304 /src/main/java | |
parent | 8d6139b07c52f19e6038e11507fdea3f9dd6b911 (diff) |
Use autoconfigured Executor
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/com/juick/server/XMPPManager.java | 4 | ||||
-rw-r--r-- | src/main/java/com/juick/server/configuration/BaseWebConfiguration.java | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/main/java/com/juick/server/XMPPManager.java b/src/main/java/com/juick/server/XMPPManager.java index 5c58345a..dd2eaaf2 100644 --- a/src/main/java/com/juick/server/XMPPManager.java +++ b/src/main/java/com/juick/server/XMPPManager.java @@ -114,7 +114,7 @@ public class XMPPManager implements NotificationListener { @Inject private PMQueriesService pmQueriesService; @Inject - private Executor threadPoolTaskExecutor; + private Executor applicationTaskExecutor; @Value("${service_user:juick}") private String serviceUsername; @Inject @@ -259,7 +259,7 @@ public class XMPPManager implements NotificationListener { xmpp.addInboundPresenceListener(event -> { incomingPresence(event.getPresence()); }); - threadPoolTaskExecutor.execute(() -> { + applicationTaskExecutor.execute(() -> { try { xmpp.connect(); } catch (XmppException e) { diff --git a/src/main/java/com/juick/server/configuration/BaseWebConfiguration.java b/src/main/java/com/juick/server/configuration/BaseWebConfiguration.java index 92812ba1..f8357b42 100644 --- a/src/main/java/com/juick/server/configuration/BaseWebConfiguration.java +++ b/src/main/java/com/juick/server/configuration/BaseWebConfiguration.java @@ -47,10 +47,6 @@ public class BaseWebConfiguration implements WebMvcConfigurer { } @Bean - public Executor taskExecutor() { - return new ThreadPoolTaskExecutor(); - } - @Bean public KeystoreManager keystoreManager() { return new KeystoreManager(keystore, keystorePassword); } |