Package cn.sinozg.applet.common.config
Class ThreadPoolConfig
java.lang.Object
cn.sinozg.applet.common.config.ThreadPoolConfig
- All Implemented Interfaces:
org.springframework.scheduling.annotation.AsyncConfigurer
@EnableAsync
@Configuration
public class ThreadPoolConfig
extends Object
implements org.springframework.scheduling.annotation.AsyncConfigurer
线程池配置 包装注解@Async 支持异步获取信息
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription配置注解@Async的org.springframework.aop.interceptor.AsyncUncaughtExceptionHandlerprotected ScheduledExecutorService执行周期性或定时任务
-
Constructor Details
-
ThreadPoolConfig
public ThreadPoolConfig()
-
-
Method Details
-
getAsyncExecutor
配置注解@Async的- Specified by:
getAsyncExecutorin interfaceorg.springframework.scheduling.annotation.AsyncConfigurer- Returns:
- 线程池
-
getAsyncUncaughtExceptionHandler
public org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler()- Specified by:
getAsyncUncaughtExceptionHandlerin interfaceorg.springframework.scheduling.annotation.AsyncConfigurer
-
scheduledExecutorService
@Bean(name="scheduledExecutorService") protected ScheduledExecutorService scheduledExecutorService()执行周期性或定时任务- Returns:
- 线程池
-